@liujitcn/kratos-admin-bi 0.0.0-stage → 0.1.6

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 (166) hide show
  1. package/README.md +43 -2
  2. package/dist/package/declarations/index.d.ts +1 -0
  3. package/dist/package/declarations/src/api/bi/admin/v1/bi_card.d.ts +18 -0
  4. package/dist/package/declarations/src/api/bi/admin/v1/bi_card.js +46 -0
  5. package/dist/package/declarations/src/api/bi/admin/v1/bi_dashboard.d.ts +17 -0
  6. package/dist/package/declarations/src/api/bi/admin/v1/bi_dashboard.js +30 -0
  7. package/dist/package/declarations/src/api/bi/admin/v1/bi_query.d.ts +11 -0
  8. package/dist/package/declarations/src/api/bi/admin/v1/bi_query.js +41 -0
  9. package/dist/package/declarations/src/api/bi/admin/v1/bi_query_record.d.ts +10 -0
  10. package/dist/package/declarations/src/api/bi/admin/v1/bi_query_record.js +14 -0
  11. package/dist/package/declarations/src/api/bi/admin/v1/bi_source.d.ts +26 -0
  12. package/dist/package/declarations/src/api/bi/admin/v1/bi_source.js +46 -0
  13. package/dist/package/declarations/src/bi-core.d.ts +17 -0
  14. package/dist/package/declarations/src/bi-core.js +22 -0
  15. package/dist/package/declarations/src/bi-dashboard-schema.d.ts +31 -0
  16. package/dist/package/declarations/src/bi-dashboard-schema.js +39 -0
  17. package/dist/package/declarations/src/bi-messages.d.ts +247 -0
  18. package/dist/package/declarations/src/bi-messages.js +247 -0
  19. package/dist/package/declarations/src/bi-response.d.ts +10 -0
  20. package/dist/package/declarations/src/bi-response.js +33 -0
  21. package/dist/package/declarations/src/bi-vue.d.ts +10 -0
  22. package/dist/package/declarations/src/bi-vue.js +10 -0
  23. package/dist/package/declarations/src/card-schema.d.ts +30 -0
  24. package/dist/package/declarations/src/card-schema.js +87 -0
  25. package/dist/package/declarations/src/components/BiCardChartEditor.vue.d.ts +17 -0
  26. package/dist/package/declarations/src/components/BiCardChartEditor.vue.js +527 -0
  27. package/dist/package/declarations/src/components/BiCardFormDialog.vue.d.ts +20 -0
  28. package/dist/package/declarations/src/components/BiCardFormDialog.vue.js +495 -0
  29. package/dist/package/declarations/src/components/BiCardLibrary.vue.d.ts +3 -0
  30. package/dist/package/declarations/src/components/BiCardLibrary.vue.js +807 -0
  31. package/dist/package/declarations/src/components/BiCardVisualization.vue.d.ts +10 -0
  32. package/dist/package/declarations/src/components/BiCardVisualization.vue.js +97 -0
  33. package/dist/package/declarations/src/components/BiChart.vue.d.ts +20 -0
  34. package/dist/package/declarations/src/components/BiChart.vue.js +112 -0
  35. package/dist/package/declarations/src/components/BiDashboard.vue.d.ts +9 -0
  36. package/dist/package/declarations/src/components/BiDashboard.vue.js +81 -0
  37. package/dist/package/declarations/src/components/BiDashboardMenuDialog.vue.d.ts +12 -0
  38. package/dist/package/declarations/src/components/BiDashboardMenuDialog.vue.js +252 -0
  39. package/dist/package/declarations/src/components/BiDataCard.vue.d.ts +36 -0
  40. package/dist/package/declarations/src/components/BiDataCard.vue.js +372 -0
  41. package/dist/package/declarations/src/components/BiDesigner.vue.d.ts +17 -0
  42. package/dist/package/declarations/src/components/BiDesigner.vue.js +666 -0
  43. package/dist/package/declarations/src/components/BiSourceModelDialog.vue.d.ts +17 -0
  44. package/dist/package/declarations/src/components/BiSourceModelDialog.vue.js +2118 -0
  45. package/dist/package/declarations/src/components/BiWorkbenchPreview.vue.d.ts +7 -0
  46. package/dist/package/declarations/src/components/BiWorkbenchPreview.vue.js +176 -0
  47. package/dist/package/declarations/src/components/source-model-layout.d.ts +3 -0
  48. package/dist/package/declarations/src/components/source-model-layout.js +66 -0
  49. package/dist/package/declarations/src/dataset/index.d.ts +7 -0
  50. package/dist/package/declarations/src/dataset/index.js +25 -0
  51. package/dist/package/declarations/src/dataset/labels.d.ts +2 -0
  52. package/dist/package/declarations/src/dataset/labels.js +21 -0
  53. package/dist/package/declarations/src/dataset/transform.d.ts +20 -0
  54. package/dist/package/declarations/src/dataset/transform.js +173 -0
  55. package/dist/package/declarations/src/engine/chart-types.d.ts +14 -0
  56. package/dist/package/declarations/src/engine/chart-types.js +37 -0
  57. package/dist/package/declarations/src/engine/echarts.d.ts +16 -0
  58. package/dist/package/declarations/src/engine/echarts.js +491 -0
  59. package/dist/package/declarations/src/engine/types.d.ts +36 -0
  60. package/dist/package/declarations/src/engine/types.js +20 -0
  61. package/dist/package/declarations/src/env.d.ts +17 -0
  62. package/dist/package/declarations/src/env.js +67 -0
  63. package/dist/package/declarations/src/index.d.ts +1 -0
  64. package/dist/package/declarations/src/index.js +1 -0
  65. package/dist/package/declarations/src/locales/en-US.json +254 -0
  66. package/dist/package/declarations/src/locales/generated.d.ts +1021 -0
  67. package/dist/package/declarations/src/locales/generated.js +13 -0
  68. package/dist/package/declarations/src/locales/ja-JP.json +254 -0
  69. package/dist/package/declarations/src/locales/zh-CN.json +254 -0
  70. package/dist/package/declarations/src/locales/zh-TW.json +254 -0
  71. package/dist/package/declarations/src/module.d.ts +2 -0
  72. package/dist/package/declarations/src/module.js +9 -0
  73. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_card.d.ts +145 -0
  74. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_card.js +6 -0
  75. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_dashboard.d.ts +107 -0
  76. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_dashboard.js +6 -0
  77. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query.d.ts +157 -0
  78. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query.js +6 -0
  79. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query_record.d.ts +83 -0
  80. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_query_record.js +15 -0
  81. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_source.d.ts +301 -0
  82. package/dist/package/declarations/src/rpc/bi/admin/v1/bi_source.js +6 -0
  83. package/dist/package/declarations/src/rpc/common/v1/types.d.ts +60 -0
  84. package/dist/package/declarations/src/rpc/common/v1/types.js +6 -0
  85. package/dist/package/declarations/src/schema/layout.d.ts +7 -0
  86. package/dist/package/declarations/src/schema/layout.js +52 -0
  87. package/dist/package/declarations/src/schema/types.d.ts +83 -0
  88. package/dist/package/declarations/src/schema/types.js +1 -0
  89. package/dist/package/declarations/src/theme/index.d.ts +29 -0
  90. package/dist/package/declarations/src/theme/index.js +83 -0
  91. package/dist/package/declarations/src/theme/palettes.d.ts +7 -0
  92. package/dist/package/declarations/src/theme/palettes.js +28 -0
  93. package/dist/package/declarations/src/theme/presets.d.ts +73 -0
  94. package/dist/package/declarations/src/theme/presets.js +235 -0
  95. package/dist/package/declarations/src/views/card/index.vue.d.ts +3 -0
  96. package/dist/package/declarations/src/views/card/index.vue.js +18 -0
  97. package/dist/package/declarations/src/views/dashboard/index.vue.d.ts +3 -0
  98. package/dist/package/declarations/src/views/dashboard/index.vue.js +107 -0
  99. package/dist/package/declarations/src/views/designer/index.vue.d.ts +3 -0
  100. package/dist/package/declarations/src/views/designer/index.vue.js +332 -0
  101. package/dist/package/declarations/src/views/manage/index.vue.d.ts +3 -0
  102. package/dist/package/declarations/src/views/manage/index.vue.js +325 -0
  103. package/dist/package/declarations/src/views/query/index.vue.d.ts +3 -0
  104. package/dist/package/declarations/src/views/query/index.vue.js +876 -0
  105. package/dist/package/declarations/src/views/source/index.vue.d.ts +3 -0
  106. package/dist/package/declarations/src/views/source/index.vue.js +343 -0
  107. package/dist/package/declarations/src/views/workbench/index.vue.d.ts +3 -0
  108. package/dist/package/declarations/src/views/workbench/index.vue.js +362 -0
  109. package/dist/package/src/api/bi/admin/v1/bi_card.ts +67 -0
  110. package/dist/package/src/api/bi/admin/v1/bi_dashboard.ts +51 -0
  111. package/dist/package/src/api/bi/admin/v1/bi_query.ts +55 -0
  112. package/dist/package/src/api/bi/admin/v1/bi_query_record.ts +25 -0
  113. package/dist/package/src/api/bi/admin/v1/bi_source.ts +80 -0
  114. package/dist/package/src/bi-core.ts +43 -0
  115. package/dist/package/src/bi-dashboard-schema.ts +69 -0
  116. package/dist/package/src/bi-messages.ts +249 -0
  117. package/dist/package/src/bi-response.ts +39 -0
  118. package/dist/package/src/bi-vue.ts +13 -0
  119. package/dist/package/src/card-schema.ts +111 -0
  120. package/dist/package/src/components/BiCardChartEditor.vue +139 -0
  121. package/dist/package/src/components/BiCardFormDialog.vue +289 -0
  122. package/dist/package/src/components/BiCardLibrary.vue +310 -0
  123. package/dist/package/src/components/BiCardVisualization.vue +95 -0
  124. package/dist/package/src/components/BiChart.vue +134 -0
  125. package/dist/package/src/components/BiDashboard.vue +53 -0
  126. package/dist/package/src/components/BiDashboardMenuDialog.vue +177 -0
  127. package/dist/package/src/components/BiDataCard.vue +231 -0
  128. package/dist/package/src/components/BiDesigner.vue +287 -0
  129. package/dist/package/src/components/BiSourceModelDialog.vue +846 -0
  130. package/dist/package/src/components/BiWorkbenchPreview.vue +131 -0
  131. package/dist/package/src/components/source-model-layout.ts +62 -0
  132. package/dist/package/src/dataset/index.ts +28 -0
  133. package/dist/package/src/dataset/labels.ts +19 -0
  134. package/dist/package/src/dataset/transform.ts +189 -0
  135. package/dist/package/src/engine/chart-types.ts +44 -0
  136. package/dist/package/src/engine/echarts.ts +568 -0
  137. package/dist/package/src/engine/types.ts +60 -0
  138. package/dist/package/src/env.ts +82 -0
  139. package/dist/package/src/index.ts +1 -0
  140. package/dist/package/src/locales/en-US.json +254 -0
  141. package/dist/package/src/locales/generated.ts +16 -0
  142. package/dist/package/src/locales/ja-JP.json +254 -0
  143. package/dist/package/src/locales/zh-CN.json +254 -0
  144. package/dist/package/src/locales/zh-TW.json +254 -0
  145. package/dist/package/src/module.ts +12 -0
  146. package/dist/package/src/rpc/bi/admin/v1/bi_card.ts +169 -0
  147. package/dist/package/src/rpc/bi/admin/v1/bi_dashboard.ts +126 -0
  148. package/dist/package/src/rpc/bi/admin/v1/bi_query.ts +187 -0
  149. package/dist/package/src/rpc/bi/admin/v1/bi_query_record.ts +98 -0
  150. package/dist/package/src/rpc/bi/admin/v1/bi_source.ts +338 -0
  151. package/dist/package/src/rpc/common/v1/types.ts +77 -0
  152. package/dist/package/src/schema/layout.ts +54 -0
  153. package/dist/package/src/schema/types.ts +103 -0
  154. package/dist/package/src/styles.scss +1 -0
  155. package/dist/package/src/theme/index.ts +108 -0
  156. package/dist/package/src/theme/palettes.ts +34 -0
  157. package/dist/package/src/theme/presets.ts +278 -0
  158. package/dist/package/src/views/card/index.vue +5 -0
  159. package/dist/package/src/views/dashboard/index.vue +58 -0
  160. package/dist/package/src/views/designer/index.vue +164 -0
  161. package/dist/package/src/views/manage/index.vue +276 -0
  162. package/dist/package/src/views/query/index.vue +593 -0
  163. package/dist/package/src/views/source/index.vue +214 -0
  164. package/dist/package/src/views/workbench/index.vue +208 -0
  165. package/package.json +67 -3
  166. package/tsconfig.json +12 -0
@@ -0,0 +1,2118 @@
1
+ /// <reference types="../../../../../node_modules/.pnpm/@vue+language-core@3.3.13/node_modules/@vue/language-core/types/template-helpers.d.ts" />
2
+ /// <reference types="../../../../../node_modules/.pnpm/@vue+language-core@3.3.13/node_modules/@vue/language-core/types/props-fallback.d.ts" />
3
+ import { computed, nextTick, ref, useId, watch } from "vue";
4
+ import { VueFlow, Handle, MarkerType, Panel, Position, useVueFlow } from "@vue-flow/core";
5
+ import { Background } from "@vue-flow/background";
6
+ import { Controls } from "@vue-flow/controls";
7
+ import { MiniMap } from "@vue-flow/minimap";
8
+ import { CirclePlus, DataAnalysis, Delete } from "@element-plus/icons-vue";
9
+ import { t } from "@liujitcn/kratos-admin-core";
10
+ import { defBiQueryService } from "../api/bi/admin/v1/bi_query";
11
+ import { defBiSourceService } from "../api/bi/admin/v1/bi_source";
12
+ import { formatSourceModelLayout } from "./source-model-layout";
13
+ import "@vue-flow/core/dist/style.css";
14
+ import "@vue-flow/controls/dist/style.css";
15
+ import "@vue-flow/minimap/dist/style.css";
16
+ const { defineProps, defineEmits, } = {};
17
+ const props = defineProps();
18
+ const emit = defineEmits();
19
+ const open = computed({ get: () => props.modelValue, set: value => emit("update:modelValue", value) });
20
+ const flowId = `bi-source-model-${useId()}`;
21
+ const { fitView, updateNodeInternals, viewportHelper } = useVueFlow(flowId);
22
+ const loading = ref(false);
23
+ const saving = ref(false);
24
+ const previewing = ref(false);
25
+ const step = ref(0);
26
+ const tableFilter = ref("");
27
+ const schemaTables = ref([]);
28
+ const model = ref(emptyModel());
29
+ const selectedRelationIndex = ref(-1);
30
+ const savedModelSnapshot = ref("");
31
+ const modelSaved = computed(() => savedModelSnapshot.value !== "" && savedModelSnapshot.value === JSON.stringify(model.value));
32
+ const previewResult = ref();
33
+ const selectedTables = computed(() => schemaTables.value.filter(table => model.value.tables.some(item => item.key === table.key)));
34
+ const filteredTables = computed(() => schemaTables.value.filter(table => `${table.schema_name}.${schemaLabel(table)}`.toLowerCase().includes(tableFilter.value.toLowerCase())));
35
+ const selectedRelation = computed(() => model.value.relations[selectedRelationIndex.value]);
36
+ const nodes = computed(() => selectedTables.value.map((table, index) => {
37
+ const saved = model.value.tables.find(item => item.key === table.key);
38
+ const incoming = model.value.relations.find(relation => relation.right_table === table.key);
39
+ const targetPosition = incoming && (modelTable(incoming.left_table)?.x ?? 0) > (saved?.x ?? 0) ? Position.Right : Position.Left;
40
+ const outgoing = model.value.relations.map((relation, relationIndex) => ({
41
+ relation,
42
+ relationIndex,
43
+ position: (modelTable(relation.right_table)?.x ?? 0) < (saved?.x ?? 0) ? Position.Left : Position.Right
44
+ })).filter(({ relation }) => relation.left_table === table.key)
45
+ .sort((left, right) => (modelTable(left.relation.right_table)?.y ?? 0) - (modelTable(right.relation.right_table)?.y ?? 0));
46
+ return {
47
+ id: table.key,
48
+ type: "table",
49
+ position: { x: saved?.x ?? 80 + (index % 3) * 330, y: saved?.y ?? 60 + Math.floor(index / 3) * 290 },
50
+ data: {
51
+ key: table.key,
52
+ name: table.name,
53
+ schema_name: table.schema_name,
54
+ targetPosition,
55
+ handles: outgoing.length ? outgoing.map(handle => {
56
+ const siblings = outgoing.filter(item => item.position === handle.position);
57
+ return { id: `relation-${handle.relationIndex}`, top: (siblings.indexOf(handle) + 1) * 100 / (siblings.length + 1), position: handle.position };
58
+ }) : [{ id: "out", top: 50, position: targetPosition === Position.Right ? Position.Left : Position.Right }]
59
+ }
60
+ };
61
+ }));
62
+ const edges = computed(() => model.value.relations.map((relation, index) => ({
63
+ id: `relation-${index}`,
64
+ source: relation.left_table,
65
+ target: relation.right_table,
66
+ sourceHandle: `relation-${index}`,
67
+ targetHandle: "in",
68
+ type: "default",
69
+ selected: selectedRelationIndex.value === index,
70
+ label: `${schemaLabel(tableFor(relation.left_table)?.columns.find(column => column.name === relation.left_column), relation.left_column || "?")} → ${schemaLabel(tableFor(relation.right_table)?.columns.find(column => column.name === relation.right_column), relation.right_column || "?")}`,
71
+ markerEnd: MarkerType.ArrowClosed,
72
+ interactionWidth: 20,
73
+ style: { stroke: selectedRelationIndex.value === index ? "var(--el-color-primary)" : "var(--el-text-color-placeholder)" },
74
+ labelStyle: { fill: "var(--el-text-color-regular)", fontSize: 12 },
75
+ labelBgStyle: { fill: "var(--el-bg-color)", stroke: "var(--el-border-color-lighter)" },
76
+ labelBgPadding: [6, 4],
77
+ labelBgBorderRadius: 4
78
+ })));
79
+ const previewRows = computed(() => previewResult.value?.rows.map(row => Object.fromEntries(row.values.map((value, index) => [`value_${index}`, value]))) ?? []);
80
+ watch(() => props.modelValue, visible => {
81
+ if (visible)
82
+ void loadModel();
83
+ });
84
+ watch(model, () => { previewResult.value = undefined; }, { deep: true });
85
+ watch(nodes, async () => {
86
+ await nextTick();
87
+ updateNodeInternals();
88
+ }, { flush: "post" });
89
+ /** 初始化数据库结构和已保存的语义模型。 */
90
+ async function loadModel() {
91
+ if (!props.source)
92
+ return;
93
+ loading.value = true;
94
+ step.value = 0;
95
+ savedModelSnapshot.value = "";
96
+ previewResult.value = undefined;
97
+ try {
98
+ const result = await defBiSourceService.ListBiSourceTables({ id: props.source.id });
99
+ schemaTables.value = result.tables ?? [];
100
+ model.value = readStoredModel(props.source.schema_json);
101
+ if (!model.value.tables.length)
102
+ model.value = emptyModel();
103
+ savedModelSnapshot.value = props.source.model_configured ? JSON.stringify(model.value) : "";
104
+ }
105
+ catch (cause) {
106
+ ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
107
+ }
108
+ finally {
109
+ loading.value = false;
110
+ }
111
+ }
112
+ /** 将数据库中保存的 JSON 转换为前端模型。 */
113
+ function readStoredModel(value) {
114
+ try {
115
+ const stored = JSON.parse(value);
116
+ return {
117
+ base_table: stored.baseTable ?? "",
118
+ tables: (stored.tables ?? []).map(table => ({ key: table.key, tenant_column: table.tenantColumn ?? table.tenant_column ?? "", x: table.x ?? 0, y: table.y ?? 0 })),
119
+ relations: (stored.relations ?? []).map(relation => ({
120
+ left_table: relation.leftTable ?? relation.left_table ?? "",
121
+ left_column: relation.leftColumn ?? relation.left_column ?? "",
122
+ right_table: relation.rightTable ?? relation.right_table ?? "",
123
+ right_column: relation.rightColumn ?? relation.right_column ?? "",
124
+ join_type: relation.joinType ?? relation.join_type ?? "left"
125
+ })),
126
+ dimensions: (stored.dimensions ?? []).map(dimension => ({ ...dimension, filterable: dimension.filterable ?? false })),
127
+ measures: (stored.measures ?? []).map(measure => ({ ...measure, aggregations: measure.aggregations ?? [] }))
128
+ };
129
+ }
130
+ catch {
131
+ return emptyModel();
132
+ }
133
+ }
134
+ /** 创建空语义模型。 */
135
+ function emptyModel() {
136
+ return { base_table: "", tables: [], relations: [], dimensions: [], measures: [] };
137
+ }
138
+ /** 判断表是否已加入模型。 */
139
+ function isSelected(key) {
140
+ return model.value.tables.some(table => table.key === key);
141
+ }
142
+ /** 更换事实表时仅保留仍属于新事实表的指标。 */
143
+ function setBaseTable(key) {
144
+ model.value.base_table = key;
145
+ model.value.measures = model.value.measures.filter(measure => measure.table === key);
146
+ }
147
+ /** 查询模型表节点以编辑租户隔离字段。 */
148
+ function modelTable(key) {
149
+ return model.value.tables.find(table => table.key === key);
150
+ }
151
+ /** 更新表的租户隔离字段。 */
152
+ function setTenantColumn(key, column) {
153
+ const table = modelTable(key);
154
+ if (table)
155
+ table.tenant_column = column;
156
+ }
157
+ /** 加入或移除建模表并清理失效的关系和字段。 */
158
+ function toggleTable(table, selected) {
159
+ if (selected) {
160
+ if (model.value.tables.length >= 8)
161
+ return;
162
+ const tenantColumn = table.columns.find(column => column.name === "tenant_id")?.name ?? "";
163
+ model.value.tables.push({ key: table.key, tenant_column: tenantColumn, x: 80 + (model.value.tables.length % 3) * 330, y: 60 + Math.floor(model.value.tables.length / 3) * 290 });
164
+ if (!model.value.base_table)
165
+ model.value.base_table = table.key;
166
+ return;
167
+ }
168
+ model.value.tables = model.value.tables.filter(item => item.key !== table.key);
169
+ model.value.relations = model.value.relations.filter(item => item.left_table !== table.key && item.right_table !== table.key);
170
+ model.value.dimensions = model.value.dimensions.filter(item => item.table !== table.key);
171
+ model.value.measures = model.value.measures.filter(item => item.table !== table.key);
172
+ if (model.value.base_table === table.key)
173
+ model.value.base_table = model.value.tables[0]?.key ?? "";
174
+ selectedRelationIndex.value = -1;
175
+ }
176
+ /** 查询指定表的发现结构。 */
177
+ function tableFor(key) {
178
+ return schemaTables.value.find(table => table.key === key);
179
+ }
180
+ /** 表和字段展示注释,选择值仍使用原始英文标识。 */
181
+ function schemaLabel(item, name = item?.name ?? "") {
182
+ return item?.comment ? `${name}(${item.comment})` : name;
183
+ }
184
+ /** 返回维度表中可作为多对一目标的唯一字段。 */
185
+ function uniqueColumns(key) {
186
+ return tableFor(key)?.columns.filter(column => column.unique) ?? [];
187
+ }
188
+ /** 按数据库字段类型推导 BI 展示类型。 */
189
+ function fieldType(table, column) {
190
+ const value = tableFor(table)?.columns.find(item => item.name === column)?.data_type.toLowerCase() ?? "";
191
+ if (/int|decimal|numeric|real|double|float/.test(value))
192
+ return "number";
193
+ if (/date|time/.test(value))
194
+ return "date";
195
+ return "string";
196
+ }
197
+ /** 返回当前度量字段可用的聚合函数。 */
198
+ function aggregationOptions(column) {
199
+ return fieldType(model.value.base_table, column) === "number" ? ["count", "sum", "avg", "min", "max"] : ["count"];
200
+ }
201
+ /** 为新增度量选择默认聚合方式。 */
202
+ function defaultAggregations(column) {
203
+ return fieldType(model.value.base_table, column) === "number" ? ["sum"] : ["count"];
204
+ }
205
+ /** 增加一条语义维度。 */
206
+ function addDimension() {
207
+ const table = selectedTables.value[0];
208
+ const column = table?.columns[0];
209
+ if (!table || !column)
210
+ return;
211
+ const code = semanticCode(table.name, column.name, model.value.dimensions.length);
212
+ model.value.dimensions.push({ code, name: column.name, type: fieldType(table.key, column.name), table: table.key, column: column.name, filterable: true });
213
+ }
214
+ /** 增加一条事实表指标。 */
215
+ function addMeasure() {
216
+ const table = tableFor(model.value.base_table);
217
+ const column = table?.columns.find(item => fieldType(table.key, item.name) === "number") ?? table?.columns[0];
218
+ if (!table || !column)
219
+ return;
220
+ const code = semanticCode(table.name, column.name, model.value.measures.length);
221
+ model.value.measures.push({ code, name: column.name, type: "number", table: table.key, column: column.name, aggregations: defaultAggregations(column.name) });
222
+ }
223
+ /** 生成合法且稳定的语义字段编码。 */
224
+ function semanticCode(table, column, index) {
225
+ const prefix = `${table}_${column}`.toLowerCase().replace(/[^a-z0-9_]/g, "_");
226
+ let suffix = index + 1;
227
+ let code = `${prefix}_${suffix}`;
228
+ while ([...model.value.dimensions, ...model.value.measures].some(field => field.code === code)) {
229
+ code = `${prefix}_${++suffix}`;
230
+ }
231
+ return code;
232
+ }
233
+ /** 拖动画布连接点后创建一条待配置关系。 */
234
+ function connectTables(connection) {
235
+ const source = connection.source;
236
+ const target = connection.target;
237
+ if (!source || !target || source === target || model.value.relations.some(item => item.right_table === target))
238
+ return;
239
+ let leftTable = source;
240
+ let rightTable = target;
241
+ const sourceReachable = reachableFromBase(source);
242
+ const targetReachable = reachableFromBase(target);
243
+ if (targetReachable && !sourceReachable)
244
+ [leftTable, rightTable] = [target, source];
245
+ else if (sourceReachable && targetReachable)
246
+ return;
247
+ model.value.relations.push({ left_table: leftTable, left_column: "", right_table: rightTable, right_column: "", join_type: "left" });
248
+ selectedRelationIndex.value = model.value.relations.length - 1;
249
+ void layoutGraph();
250
+ }
251
+ /** 判断表是否已经从事实表连通。 */
252
+ function reachableFromBase(key) {
253
+ const reachable = new Set([model.value.base_table]);
254
+ for (let changed = true; changed;) {
255
+ changed = false;
256
+ for (const relation of model.value.relations) {
257
+ if (reachable.has(relation.left_table) && !reachable.has(relation.right_table)) {
258
+ reachable.add(relation.right_table);
259
+ changed = true;
260
+ }
261
+ }
262
+ }
263
+ return reachable.has(key);
264
+ }
265
+ /** 选择画布关系并打开其配置。 */
266
+ function selectRelation({ edge }) {
267
+ selectedRelationIndex.value = Number(edge.id.replace("relation-", ""));
268
+ }
269
+ /** 删除当前选中的关系。 */
270
+ function removeRelation() {
271
+ if (selectedRelationIndex.value < 0)
272
+ return;
273
+ model.value.relations.splice(selectedRelationIndex.value, 1);
274
+ selectedRelationIndex.value = -1;
275
+ }
276
+ /** 将画布节点坐标保存到语义模型。 */
277
+ function moveTable({ node }) {
278
+ const table = model.value.tables.find(item => item.key === node.id);
279
+ if (!table)
280
+ return;
281
+ table.x = Math.round(node.position.x);
282
+ table.y = Math.round(node.position.y);
283
+ }
284
+ /** 整理表关系布局后适配画布视口。 */
285
+ async function layoutGraph() {
286
+ formatSourceModelLayout(model.value);
287
+ await nextTick();
288
+ fitGraph();
289
+ }
290
+ /** 初始化或恢复画布视口。 */
291
+ function fitGraph() {
292
+ if (viewportHelper.value.viewportInitialized)
293
+ void fitView({ padding: 0.18, maxZoom: 1 });
294
+ }
295
+ /** 校验当前步骤后进入下一步。 */
296
+ function nextStep() {
297
+ if (step.value === 0 && (!model.value.base_table || selectedTables.value.length === 0)) {
298
+ ElMessage.warning(t("bi.source.model.validation.select_tables"));
299
+ return;
300
+ }
301
+ if (step.value === 0)
302
+ formatSourceModelLayout(model.value);
303
+ step.value++;
304
+ }
305
+ /** 保存关系模型并启用数据源。 */
306
+ async function saveModel() {
307
+ if (!props.source)
308
+ return;
309
+ saving.value = true;
310
+ try {
311
+ const result = await defBiSourceService.SaveBiSourceModel({ id: props.source.id, model: model.value });
312
+ savedModelSnapshot.value = JSON.stringify(model.value);
313
+ previewResult.value = undefined;
314
+ emit("saved", result);
315
+ ElMessage.success(t("bi.source.model.message.saved"));
316
+ }
317
+ catch (cause) {
318
+ ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
319
+ }
320
+ finally {
321
+ saving.value = false;
322
+ }
323
+ }
324
+ /** 使用一个维度和指标预览已保存模型。 */
325
+ async function previewModel() {
326
+ if (!props.source || !modelSaved.value || !model.value.measures.length)
327
+ return;
328
+ previewing.value = true;
329
+ try {
330
+ const dimension = model.value.dimensions[0];
331
+ const measure = model.value.measures[0];
332
+ previewResult.value = await defBiQueryService.PreviewBiQuery({ query: {
333
+ source_code: props.source.code,
334
+ dimensions: dimension ? [dimension.code] : [],
335
+ measures: [{ code: measure.code, aggregation: measure.aggregations[0] ?? "count" }],
336
+ filters: [],
337
+ limit: 10,
338
+ time_range: undefined,
339
+ orders: []
340
+ } });
341
+ }
342
+ catch (cause) {
343
+ ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
344
+ }
345
+ finally {
346
+ previewing.value = false;
347
+ }
348
+ }
349
+ const __VLS_ctx = {
350
+ ...{},
351
+ ...{},
352
+ ...{},
353
+ ...{},
354
+ };
355
+ let __VLS_components;
356
+ let __VLS_intrinsics;
357
+ let __VLS_directives;
358
+ void __VLS_ctx, __VLS_components, __VLS_intrinsics, __VLS_directives;
359
+ // @ts-ignore
360
+ __VLS_withDotValue(step, {});
361
+ // @ts-ignore
362
+ __VLS_withDotValue(model, {});
363
+ // @ts-ignore
364
+ __VLS_withDotValue(filteredTables, {});
365
+ // @ts-ignore
366
+ __VLS_withDotValue(selectedTables, {});
367
+ // @ts-ignore
368
+ __VLS_withDotValue(selectedRelationIndex, {});
369
+ // @ts-ignore
370
+ __VLS_withDotValue(selectedRelation, {});
371
+ // @ts-ignore
372
+ __VLS_withDotValue(previewResult, {});
373
+ // @ts-ignore
374
+ __VLS_withDotValue(open, {});
375
+ // @ts-ignore
376
+ __VLS_withDotValue(modelSaved, {});
377
+ void {};
378
+ /** @type {__VLS_StyleScopedClasses['source-model__table-info']} */ ;
379
+ /** @type {__VLS_StyleScopedClasses['source-model__table-info']} */ ;
380
+ /** @type {__VLS_StyleScopedClasses['source-model__table-info']} */ ;
381
+ /** @type {__VLS_StyleScopedClasses['source-model__selection-count']} */ ;
382
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
383
+ /** @type {__VLS_StyleScopedClasses['source-model__node']} */ ;
384
+ /** @type {__VLS_StyleScopedClasses['source-model__node']} */ ;
385
+ /** @type {__VLS_StyleScopedClasses['source-model__node']} */ ;
386
+ /** @type {__VLS_StyleScopedClasses['source-model__node']} */ ;
387
+ /** @type {__VLS_StyleScopedClasses['source-model__node']} */ ;
388
+ /** @type {__VLS_StyleScopedClasses['source-model__node-columns']} */ ;
389
+ /** @type {__VLS_StyleScopedClasses['source-model__node-columns']} */ ;
390
+ /** @type {__VLS_StyleScopedClasses['source-model__node-columns']} */ ;
391
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
392
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
393
+ /** @type {__VLS_StyleScopedClasses['vue-flow__edge-path']} */ ;
394
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
395
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
396
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
397
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
398
+ /** @type {__VLS_StyleScopedClasses['source-model__relation-heading']} */ ;
399
+ /** @type {__VLS_StyleScopedClasses['source-model__semantic-section']} */ ;
400
+ /** @type {__VLS_StyleScopedClasses['source-model__preview']} */ ;
401
+ /** @type {__VLS_StyleScopedClasses['source-model__semantic-section']} */ ;
402
+ /** @type {__VLS_StyleScopedClasses['source-model__preview']} */ ;
403
+ /** @type {__VLS_StyleScopedClasses['source-model__preview']} */ ;
404
+ /** @type {__VLS_StyleScopedClasses['source-model__table-toolbar']} */ ;
405
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
406
+ /** @type {__VLS_StyleScopedClasses['source-model__table-row']} */ ;
407
+ /** @type {__VLS_StyleScopedClasses['source-model__table-info']} */ ;
408
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
409
+ /** @type {__VLS_StyleScopedClasses['source-model__tenant-select']} */ ;
410
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
411
+ /** @type {__VLS_StyleScopedClasses['vue-flow']} */ ;
412
+ /** @type {__VLS_StyleScopedClasses['source-model__relation-panel']} */ ;
413
+ let __VLS_0;
414
+ /** @ts-ignore @type { | typeof __VLS_components.elDialog | typeof __VLS_components.ElDialog | typeof __VLS_components['el-dialog'] | typeof __VLS_components.elDialog | typeof __VLS_components.ElDialog | typeof __VLS_components['el-dialog']} */
415
+ elDialog;
416
+ // @ts-ignore
417
+ const __VLS_1 = __VLS_asFunctionalComponent1(__VLS_0, new __VLS_0({
418
+ // @ts-ignore
419
+ modelValue: (open.value), title: (__VLS_ctx.source?.name || __VLS_unwrap(t, {})('bi.source.model.title')), width: "min(1440px, 96vw)", top: "3vh", destroyOnClose: true, ...{ class: "bi-source-model-dialog" },
420
+ }));
421
+ const __VLS_2 = __VLS_1({
422
+ modelValue: (open.value),
423
+ title: (__VLS_ctx.source?.name || __VLS_unwrap(t, {})('bi.source.model.title')),
424
+ width: "min(1440px, 96vw)",
425
+ top: "3vh",
426
+ destroyOnClose: true,
427
+ ...{ class: "bi-source-model-dialog" },
428
+ }, ...__VLS_functionalComponentArgsRest(__VLS_1));
429
+ /** @type {__VLS_StyleScopedClasses['bi-source-model-dialog']} */ ;
430
+ const { default: __VLS_5 } = __VLS_nonNull(__VLS_3.slots);
431
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
432
+ ...{ class: "source-model" },
433
+ });
434
+ __VLS_asFunctionalDirective(__VLS_directives.vLoading, {})(__VLS_nonNull(null), { ...__VLS_directiveBindingRestFields, value: (__VLS_unwrap(loading, {})), }, __VLS_nonNull(null), __VLS_nonNull(null));
435
+ /** @type {__VLS_StyleScopedClasses['source-model']} */ ;
436
+ let __VLS_6;
437
+ /** @ts-ignore @type { | typeof __VLS_components.elSteps | typeof __VLS_components.ElSteps | typeof __VLS_components['el-steps'] | typeof __VLS_components.elSteps | typeof __VLS_components.ElSteps | typeof __VLS_components['el-steps']} */
438
+ elSteps;
439
+ // @ts-ignore
440
+ const __VLS_7 = __VLS_asFunctionalComponent1(__VLS_6, new __VLS_6({
441
+ // @ts-ignore
442
+ active: (step.value), finishStatus: "success", alignCenter: true,
443
+ }));
444
+ const __VLS_8 = __VLS_7({
445
+ active: (step.value),
446
+ finishStatus: "success",
447
+ alignCenter: true,
448
+ }, ...__VLS_functionalComponentArgsRest(__VLS_7));
449
+ const { default: __VLS_11 } = __VLS_nonNull(__VLS_9.slots);
450
+ let __VLS_12;
451
+ /** @ts-ignore @type { | typeof __VLS_components.elStep | typeof __VLS_components.ElStep | typeof __VLS_components['el-step']} */
452
+ elStep;
453
+ // @ts-ignore
454
+ const __VLS_13 = __VLS_asFunctionalComponent1(__VLS_12, new __VLS_12({
455
+ // @ts-ignore
456
+ title: (__VLS_unwrap(t, {})('bi.source.model.step.tables')),
457
+ }));
458
+ const __VLS_14 = __VLS_13({
459
+ title: (__VLS_unwrap(t, {})('bi.source.model.step.tables')),
460
+ }, ...__VLS_functionalComponentArgsRest(__VLS_13));
461
+ let __VLS_17;
462
+ /** @ts-ignore @type { | typeof __VLS_components.elStep | typeof __VLS_components.ElStep | typeof __VLS_components['el-step']} */
463
+ elStep;
464
+ // @ts-ignore
465
+ const __VLS_18 = __VLS_asFunctionalComponent1(__VLS_17, new __VLS_17({
466
+ // @ts-ignore
467
+ title: (__VLS_unwrap(t, {})('bi.source.model.step.relations')),
468
+ }));
469
+ const __VLS_19 = __VLS_18({
470
+ title: (__VLS_unwrap(t, {})('bi.source.model.step.relations')),
471
+ }, ...__VLS_functionalComponentArgsRest(__VLS_18));
472
+ let __VLS_22;
473
+ /** @ts-ignore @type { | typeof __VLS_components.elStep | typeof __VLS_components.ElStep | typeof __VLS_components['el-step']} */
474
+ elStep;
475
+ // @ts-ignore
476
+ const __VLS_23 = __VLS_asFunctionalComponent1(__VLS_22, new __VLS_22({
477
+ // @ts-ignore
478
+ title: (__VLS_unwrap(t, {})('bi.source.model.step.fields')),
479
+ }));
480
+ const __VLS_24 = __VLS_23({
481
+ title: (__VLS_unwrap(t, {})('bi.source.model.step.fields')),
482
+ }, ...__VLS_functionalComponentArgsRest(__VLS_23));
483
+ // @ts-ignore
484
+ [open, source, t, t, t, t, vLoading, loading, step,];
485
+ var __VLS_9;
486
+ if (step.value === 0) {
487
+ __VLS_asFunctionalElement1(__VLS_intrinsics.section, __VLS_intrinsics.section)({
488
+ ...{ class: "source-model__tables" },
489
+ });
490
+ /** @type {__VLS_StyleScopedClasses['source-model__tables']} */ ;
491
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
492
+ ...{ class: "source-model__table-toolbar" },
493
+ });
494
+ /** @type {__VLS_StyleScopedClasses['source-model__table-toolbar']} */ ;
495
+ let __VLS_27;
496
+ /** @ts-ignore @type { | typeof __VLS_components.elInput | typeof __VLS_components.ElInput | typeof __VLS_components['el-input']} */
497
+ elInput;
498
+ // @ts-ignore
499
+ const __VLS_28 = __VLS_asFunctionalComponent1(__VLS_27, new __VLS_27({
500
+ // @ts-ignore
501
+ modelValue: (__VLS_unwrap(tableFilter, {})), clearable: true, placeholder: (__VLS_unwrap(t, {})('bi.source.model.search_tables')),
502
+ }));
503
+ const __VLS_29 = __VLS_28({
504
+ modelValue: (__VLS_unwrap(tableFilter, {})),
505
+ clearable: true,
506
+ placeholder: (__VLS_unwrap(t, {})('bi.source.model.search_tables')),
507
+ }, ...__VLS_functionalComponentArgsRest(__VLS_28));
508
+ let __VLS_32;
509
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
510
+ elSelect;
511
+ // @ts-ignore
512
+ const __VLS_33 = __VLS_asFunctionalComponent1(__VLS_32, new __VLS_32({
513
+ // @ts-ignore
514
+ ...{ 'onUpdate:modelValue': {} }, modelValue: (model.value.base_table), placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.base_table')), disabled: (model.value.relations.length > 0),
515
+ }));
516
+ const __VLS_34 = __VLS_33({
517
+ ...{ 'onUpdate:modelValue': {} },
518
+ modelValue: (model.value.base_table),
519
+ placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.base_table')),
520
+ disabled: (model.value.relations.length > 0),
521
+ }, ...__VLS_functionalComponentArgsRest(__VLS_33));
522
+ let __VLS_37;
523
+ const __VLS_38 = {
524
+ /** @type {typeof __VLS_37.'update:modelValue'} */
525
+ 'onUpdate:modelValue': // @ts-ignore
526
+ (...[$event]) => {
527
+ void $event;
528
+ if (!(step.value === 0))
529
+ throw 0;
530
+ return (setBaseTable(String($event ?? '')));
531
+ // @ts-ignore
532
+ [t, t, step, tableFilter, model, model,];
533
+ },
534
+ };
535
+ void __VLS_38;
536
+ const { default: __VLS_39 } = __VLS_nonNull(__VLS_35.slots);
537
+ const __VLS_40 = __VLS_tryAsConstant((selectedTables.value));
538
+ for (const [table] of __VLS_vFor(__VLS_nonNull(__VLS_40))) {
539
+ let __VLS_41;
540
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
541
+ elOption;
542
+ // @ts-ignore
543
+ const __VLS_42 = __VLS_asFunctionalComponent1(__VLS_41, new __VLS_41({
544
+ // @ts-ignore
545
+ key: (table.key), label: (schemaLabel(table)), value: (table.key),
546
+ }));
547
+ const __VLS_43 = __VLS_42({
548
+ key: (table.key),
549
+ label: (schemaLabel(table)),
550
+ value: (table.key),
551
+ }, ...__VLS_functionalComponentArgsRest(__VLS_42));
552
+ // @ts-ignore
553
+ [selectedTables,];
554
+ }
555
+ // @ts-ignore
556
+ [];
557
+ var __VLS_35;
558
+ var __VLS_36;
559
+ let __VLS_46;
560
+ /** @ts-ignore @type { | typeof __VLS_components.elScrollbar | typeof __VLS_components.ElScrollbar | typeof __VLS_components['el-scrollbar'] | typeof __VLS_components.elScrollbar | typeof __VLS_components.ElScrollbar | typeof __VLS_components['el-scrollbar']} */
561
+ elScrollbar;
562
+ // @ts-ignore
563
+ const __VLS_47 = __VLS_asFunctionalComponent1(__VLS_46, new __VLS_46({
564
+ // @ts-ignore
565
+ ...{ class: "source-model__table-list" },
566
+ }));
567
+ const __VLS_48 = __VLS_47({
568
+ ...{ class: "source-model__table-list" },
569
+ }, ...__VLS_functionalComponentArgsRest(__VLS_47));
570
+ /** @type {__VLS_StyleScopedClasses['source-model__table-list']} */ ;
571
+ const { default: __VLS_51 } = __VLS_nonNull(__VLS_49.slots);
572
+ const __VLS_52 = __VLS_tryAsConstant((filteredTables.value));
573
+ for (const [table] of __VLS_vFor(__VLS_nonNull(__VLS_52))) {
574
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
575
+ key: (table.key),
576
+ ...{ class: "source-model__table-row" },
577
+ });
578
+ /** @type {__VLS_StyleScopedClasses['source-model__table-row']} */ ;
579
+ let __VLS_53;
580
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox']} */
581
+ elCheckbox;
582
+ // @ts-ignore
583
+ const __VLS_54 = __VLS_asFunctionalComponent1(__VLS_53, new __VLS_53({
584
+ // @ts-ignore
585
+ ...{ 'onChange': {} }, modelValue: (isSelected(table.key)), disabled: (!isSelected(table.key) && model.value.tables.length >= 8),
586
+ }));
587
+ const __VLS_55 = __VLS_54({
588
+ ...{ 'onChange': {} },
589
+ modelValue: (isSelected(table.key)),
590
+ disabled: (!isSelected(table.key) && model.value.tables.length >= 8),
591
+ }, ...__VLS_functionalComponentArgsRest(__VLS_54));
592
+ let __VLS_58;
593
+ const __VLS_59 = {
594
+ /** @type {typeof __VLS_58.change} */
595
+ onChange: // @ts-ignore
596
+ (...[$event]) => {
597
+ void $event;
598
+ if (!(step.value === 0))
599
+ throw 0;
600
+ return (toggleTable(table, Boolean($event)));
601
+ // @ts-ignore
602
+ [model, filteredTables,];
603
+ },
604
+ };
605
+ void __VLS_59;
606
+ var __VLS_56;
607
+ var __VLS_57;
608
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
609
+ ...{ class: "source-model__table-info" },
610
+ });
611
+ /** @type {__VLS_StyleScopedClasses['source-model__table-info']} */ ;
612
+ __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({
613
+ title: (schemaLabel(table)),
614
+ });
615
+ (schemaLabel(table));
616
+ __VLS_asFunctionalElement1(__VLS_intrinsics.small, __VLS_intrinsics.small)({});
617
+ (table.schema_name);
618
+ (table.columns.length);
619
+ (__VLS_unwrap(t, {})('bi.source.model.fields_count'));
620
+ if (isSelected(table.key)) {
621
+ let __VLS_60;
622
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
623
+ elSelect;
624
+ // @ts-ignore
625
+ const __VLS_61 = __VLS_asFunctionalComponent1(__VLS_60, new __VLS_60({
626
+ // @ts-ignore
627
+ ...{ 'onUpdate:modelValue': {} }, modelValue: (modelTable(table.key)?.tenant_column ?? ''), clearable: true, size: "small", ...{ class: "source-model__tenant-select" }, placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.shared_table')),
628
+ }));
629
+ const __VLS_62 = __VLS_61({
630
+ ...{ 'onUpdate:modelValue': {} },
631
+ modelValue: (modelTable(table.key)?.tenant_column ?? ''),
632
+ clearable: true,
633
+ size: "small",
634
+ ...{ class: "source-model__tenant-select" },
635
+ placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.shared_table')),
636
+ }, ...__VLS_functionalComponentArgsRest(__VLS_61));
637
+ let __VLS_65;
638
+ const __VLS_66 = {
639
+ /** @type {typeof __VLS_65.'update:modelValue'} */
640
+ 'onUpdate:modelValue': // @ts-ignore
641
+ (...[$event]) => {
642
+ void $event;
643
+ if (!(step.value === 0))
644
+ throw 0;
645
+ if (!(isSelected(table.key)))
646
+ throw 0;
647
+ return (setTenantColumn(table.key, String($event ?? '')));
648
+ // @ts-ignore
649
+ [t, t,];
650
+ },
651
+ };
652
+ void __VLS_66;
653
+ /** @type {__VLS_StyleScopedClasses['source-model__tenant-select']} */ ;
654
+ const { default: __VLS_67 } = __VLS_nonNull(__VLS_63.slots);
655
+ const __VLS_68 = __VLS_tryAsConstant((table.columns));
656
+ for (const [column] of __VLS_vFor(__VLS_nonNull(__VLS_68))) {
657
+ let __VLS_69;
658
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
659
+ elOption;
660
+ // @ts-ignore
661
+ const __VLS_70 = __VLS_asFunctionalComponent1(__VLS_69, new __VLS_69({
662
+ // @ts-ignore
663
+ key: (column.name), label: (schemaLabel(column)), value: (column.name),
664
+ }));
665
+ const __VLS_71 = __VLS_70({
666
+ key: (column.name),
667
+ label: (schemaLabel(column)),
668
+ value: (column.name),
669
+ }, ...__VLS_functionalComponentArgsRest(__VLS_70));
670
+ // @ts-ignore
671
+ [];
672
+ }
673
+ // @ts-ignore
674
+ [];
675
+ var __VLS_63;
676
+ var __VLS_64;
677
+ }
678
+ let __VLS_74;
679
+ /** @ts-ignore @type { | typeof __VLS_components.elTag | typeof __VLS_components.ElTag | typeof __VLS_components['el-tag'] | typeof __VLS_components.elTag | typeof __VLS_components.ElTag | typeof __VLS_components['el-tag']} */
680
+ elTag;
681
+ // @ts-ignore
682
+ const __VLS_75 = __VLS_asFunctionalComponent1(__VLS_74, new __VLS_74({
683
+ // @ts-ignore
684
+ size: "small", effect: "plain",
685
+ }));
686
+ const __VLS_76 = __VLS_75({
687
+ size: "small",
688
+ effect: "plain",
689
+ }, ...__VLS_functionalComponentArgsRest(__VLS_75));
690
+ const { default: __VLS_79 } = __VLS_nonNull(__VLS_77.slots);
691
+ (table.table_type);
692
+ // @ts-ignore
693
+ [];
694
+ var __VLS_77;
695
+ // @ts-ignore
696
+ [];
697
+ }
698
+ if (!filteredTables.value.length) {
699
+ let __VLS_80;
700
+ /** @ts-ignore @type { | typeof __VLS_components.elEmpty | typeof __VLS_components.ElEmpty | typeof __VLS_components['el-empty']} */
701
+ elEmpty;
702
+ // @ts-ignore
703
+ const __VLS_81 = __VLS_asFunctionalComponent1(__VLS_80, new __VLS_80({
704
+ // @ts-ignore
705
+ description: (__VLS_unwrap(t, {})('bi.source.model.tables_empty')),
706
+ }));
707
+ const __VLS_82 = __VLS_81({
708
+ description: (__VLS_unwrap(t, {})('bi.source.model.tables_empty')),
709
+ }, ...__VLS_functionalComponentArgsRest(__VLS_81));
710
+ }
711
+ // @ts-ignore
712
+ [t, filteredTables,];
713
+ var __VLS_49;
714
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
715
+ ...{ class: "source-model__selection-count" },
716
+ });
717
+ /** @type {__VLS_StyleScopedClasses['source-model__selection-count']} */ ;
718
+ (selectedTables.value.length);
719
+ }
720
+ else if (step.value === 1) {
721
+ __VLS_asFunctionalElement1(__VLS_intrinsics.section, __VLS_intrinsics.section)({
722
+ ...{ class: "source-model__relations" },
723
+ });
724
+ /** @type {__VLS_StyleScopedClasses['source-model__relations']} */ ;
725
+ let __VLS_85;
726
+ /** @ts-ignore @type { | typeof __VLS_components.VueFlow | typeof __VLS_components.VueFlow} */
727
+ VueFlow;
728
+ // @ts-ignore
729
+ const __VLS_86 = __VLS_asFunctionalComponent1(__VLS_85, new __VLS_85({
730
+ // @ts-ignore
731
+ ...{ 'onConnect': {} }, ...{ 'onEdgeClick': {} }, ...{ 'onNodeDragStop': {} }, ...{ 'onPaneClick': {} }, ...{ 'onInit': {} }, ...{ 'onNodesInitialized': {} }, id: (__VLS_unwrap(flowId, {})), nodes: (__VLS_unwrap(nodes, {})), edges: (__VLS_unwrap(edges, {})), nodesConnectable: (selectedTables.value.length > 1), edgesUpdatable: (false), minZoom: (0.15), maxZoom: (1.6),
732
+ }));
733
+ const __VLS_87 = __VLS_86({
734
+ ...{ 'onConnect': {} },
735
+ ...{ 'onEdgeClick': {} },
736
+ ...{ 'onNodeDragStop': {} },
737
+ ...{ 'onPaneClick': {} },
738
+ ...{ 'onInit': {} },
739
+ ...{ 'onNodesInitialized': {} },
740
+ id: (__VLS_unwrap(flowId, {})),
741
+ nodes: (__VLS_unwrap(nodes, {})),
742
+ edges: (__VLS_unwrap(edges, {})),
743
+ nodesConnectable: (selectedTables.value.length > 1),
744
+ edgesUpdatable: (false),
745
+ minZoom: (0.15),
746
+ maxZoom: (1.6),
747
+ }, ...__VLS_functionalComponentArgsRest(__VLS_86));
748
+ let __VLS_90;
749
+ const __VLS_91 = {
750
+ /** @type {typeof __VLS_90.connect} */
751
+ onConnect: (connectTables),
752
+ };
753
+ void __VLS_91;
754
+ const __VLS_92 = {
755
+ /** @type {typeof __VLS_90.edgeClick} */
756
+ onEdgeClick: (selectRelation),
757
+ };
758
+ void __VLS_92;
759
+ const __VLS_93 = {
760
+ /** @type {typeof __VLS_90.nodeDragStop} */
761
+ onNodeDragStop: (moveTable),
762
+ };
763
+ void __VLS_93;
764
+ const __VLS_94 = {
765
+ /** @type {typeof __VLS_90.paneClick} */
766
+ onPaneClick: // @ts-ignore
767
+ (...[$event]) => {
768
+ void $event;
769
+ if (!!(step.value === 0))
770
+ throw 0;
771
+ if (!(step.value === 1))
772
+ throw 0;
773
+ return (selectedRelationIndex.value = -1);
774
+ // @ts-ignore
775
+ [step, selectedTables, selectedTables, flowId, nodes, edges, selectedRelationIndex,];
776
+ },
777
+ };
778
+ void __VLS_94;
779
+ const __VLS_95 = {
780
+ /** @type {typeof __VLS_90.init} */
781
+ onInit: (fitGraph),
782
+ };
783
+ void __VLS_95;
784
+ const __VLS_96 = {
785
+ /** @type {typeof __VLS_90.nodesInitialized} */
786
+ onNodesInitialized: (fitGraph),
787
+ };
788
+ void __VLS_96;
789
+ const { default: __VLS_97 } = __VLS_nonNull(__VLS_88.slots);
790
+ let __VLS_98;
791
+ /** @ts-ignore @type { | typeof __VLS_components.Background} */
792
+ Background;
793
+ // @ts-ignore
794
+ const __VLS_99 = __VLS_asFunctionalComponent1(__VLS_98, new __VLS_98({
795
+ // @ts-ignore
796
+ gap: (20), size: (1), patternColor: "var(--el-border-color-lighter)",
797
+ }));
798
+ const __VLS_100 = __VLS_99({
799
+ gap: (20),
800
+ size: (1),
801
+ patternColor: "var(--el-border-color-lighter)",
802
+ }, ...__VLS_functionalComponentArgsRest(__VLS_99));
803
+ let __VLS_103;
804
+ /** @ts-ignore @type { | typeof __VLS_components.Controls} */
805
+ Controls;
806
+ // @ts-ignore
807
+ const __VLS_104 = __VLS_asFunctionalComponent1(__VLS_103, new __VLS_103({
808
+ // @ts-ignore
809
+ showInteractive: (false),
810
+ }));
811
+ const __VLS_105 = __VLS_104({
812
+ showInteractive: (false),
813
+ }, ...__VLS_functionalComponentArgsRest(__VLS_104));
814
+ let __VLS_108;
815
+ /** @ts-ignore @type { | typeof __VLS_components.MiniMap} */
816
+ MiniMap;
817
+ // @ts-ignore
818
+ const __VLS_109 = __VLS_asFunctionalComponent1(__VLS_108, new __VLS_108({
819
+ // @ts-ignore
820
+ position: "bottom-center", width: (150), height: (90), pannable: true, zoomable: true, nodeColor: "var(--el-color-primary-light-5)", maskColor: "var(--el-fill-color-light)",
821
+ }));
822
+ const __VLS_110 = __VLS_109({
823
+ position: "bottom-center",
824
+ width: (150),
825
+ height: (90),
826
+ pannable: true,
827
+ zoomable: true,
828
+ nodeColor: "var(--el-color-primary-light-5)",
829
+ maskColor: "var(--el-fill-color-light)",
830
+ }, ...__VLS_functionalComponentArgsRest(__VLS_109));
831
+ let __VLS_113;
832
+ /** @ts-ignore @type { | typeof __VLS_components.Panel | typeof __VLS_components.Panel} */
833
+ Panel;
834
+ // @ts-ignore
835
+ const __VLS_114 = __VLS_asFunctionalComponent1(__VLS_113, new __VLS_113({
836
+ // @ts-ignore
837
+ position: "top-right",
838
+ }));
839
+ const __VLS_115 = __VLS_114({
840
+ position: "top-right",
841
+ }, ...__VLS_functionalComponentArgsRest(__VLS_114));
842
+ const { default: __VLS_118 } = __VLS_nonNull(__VLS_116.slots);
843
+ let __VLS_119;
844
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
845
+ elButton;
846
+ // @ts-ignore
847
+ const __VLS_120 = __VLS_asFunctionalComponent1(__VLS_119, new __VLS_119({
848
+ // @ts-ignore
849
+ ...{ 'onClick': {} }, size: "small",
850
+ }));
851
+ const __VLS_121 = __VLS_120({
852
+ ...{ 'onClick': {} },
853
+ size: "small",
854
+ }, ...__VLS_functionalComponentArgsRest(__VLS_120));
855
+ let __VLS_124;
856
+ const __VLS_125 = {
857
+ /** @type {typeof __VLS_124.click} */
858
+ onClick: (layoutGraph),
859
+ };
860
+ void __VLS_125;
861
+ const { default: __VLS_126 } = __VLS_nonNull(__VLS_122.slots);
862
+ (__VLS_unwrap(t, {})('bi.source.model.action.auto_layout'));
863
+ // @ts-ignore
864
+ [t,];
865
+ var __VLS_122;
866
+ var __VLS_123;
867
+ // @ts-ignore
868
+ [];
869
+ var __VLS_116;
870
+ {
871
+ const { 'node-table': __VLS_127 } = __VLS_nonNull(__VLS_88.slots);
872
+ const [{ data }] = __VLS_vSlot(__VLS_nonNull(__VLS_127));
873
+ __VLS_asFunctionalElement1(__VLS_intrinsics.article, __VLS_intrinsics.article)({
874
+ ...{ class: "source-model__node" },
875
+ ...{ class: ({ 'is-base': data.key === model.value.base_table }) },
876
+ });
877
+ /** @type {__VLS_StyleScopedClasses['source-model__node']} */ ;
878
+ /** @type {__VLS_StyleScopedClasses['is-base']} */ ;
879
+ let __VLS_128;
880
+ /** @ts-ignore @type { | typeof __VLS_components.Handle} */
881
+ Handle;
882
+ // @ts-ignore
883
+ const __VLS_129 = __VLS_asFunctionalComponent1(__VLS_128, new __VLS_128({
884
+ // @ts-ignore
885
+ id: "in", type: "target", position: (data.targetPosition), ...{ style: (data.key === model.value.base_table ? { top: '12px' } : undefined) },
886
+ }));
887
+ const __VLS_130 = __VLS_129({
888
+ id: "in",
889
+ type: "target",
890
+ position: (data.targetPosition),
891
+ ...{ style: (data.key === model.value.base_table ? { top: '12px' } : undefined) },
892
+ }, ...__VLS_functionalComponentArgsRest(__VLS_129));
893
+ __VLS_asFunctionalElement1(__VLS_intrinsics.header, __VLS_intrinsics.header)({});
894
+ __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({
895
+ title: (schemaLabel(tableFor(data.key), data.name)),
896
+ });
897
+ (schemaLabel(tableFor(data.key), data.name));
898
+ if (data.key === model.value.base_table) {
899
+ let __VLS_133;
900
+ /** @ts-ignore @type { | typeof __VLS_components.elTag | typeof __VLS_components.ElTag | typeof __VLS_components['el-tag'] | typeof __VLS_components.elTag | typeof __VLS_components.ElTag | typeof __VLS_components['el-tag']} */
901
+ elTag;
902
+ // @ts-ignore
903
+ const __VLS_134 = __VLS_asFunctionalComponent1(__VLS_133, new __VLS_133({
904
+ // @ts-ignore
905
+ size: "small", type: "success",
906
+ }));
907
+ const __VLS_135 = __VLS_134({
908
+ size: "small",
909
+ type: "success",
910
+ }, ...__VLS_functionalComponentArgsRest(__VLS_134));
911
+ const { default: __VLS_138 } = __VLS_nonNull(__VLS_136.slots);
912
+ (__VLS_unwrap(t, {})('bi.source.model.field.base_table'));
913
+ // @ts-ignore
914
+ [t, model, model, model,];
915
+ var __VLS_136;
916
+ }
917
+ __VLS_asFunctionalElement1(__VLS_intrinsics.small, __VLS_intrinsics.small)({});
918
+ (data.schema_name);
919
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
920
+ ...{ class: "source-model__node-columns nodrag nowheel" },
921
+ });
922
+ /** @type {__VLS_StyleScopedClasses['source-model__node-columns']} */ ;
923
+ /** @type {__VLS_StyleScopedClasses['nodrag']} */ ;
924
+ /** @type {__VLS_StyleScopedClasses['nowheel']} */ ;
925
+ const __VLS_139 = __VLS_tryAsConstant((tableFor(data.key)?.columns));
926
+ for (const [column] of __VLS_vFor(__VLS_nonNull(__VLS_139))) {
927
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
928
+ key: (column.name),
929
+ });
930
+ __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({
931
+ title: (schemaLabel(column)),
932
+ });
933
+ (schemaLabel(column));
934
+ __VLS_asFunctionalElement1(__VLS_intrinsics.small, __VLS_intrinsics.small)({});
935
+ (column.data_type);
936
+ // @ts-ignore
937
+ [];
938
+ }
939
+ const __VLS_140 = __VLS_tryAsConstant((data.handles));
940
+ for (const [handle] of __VLS_vFor(__VLS_nonNull(__VLS_140))) {
941
+ let __VLS_141;
942
+ /** @ts-ignore @type { | typeof __VLS_components.Handle} */
943
+ Handle;
944
+ // @ts-ignore
945
+ const __VLS_142 = __VLS_asFunctionalComponent1(__VLS_141, new __VLS_141({
946
+ // @ts-ignore
947
+ id: (handle.id), key: (handle.id), type: "source", position: (handle.position), ...{ style: ({ top: `${handle.top}%` }) },
948
+ }));
949
+ const __VLS_143 = __VLS_142({
950
+ id: (handle.id),
951
+ key: (handle.id),
952
+ type: "source",
953
+ position: (handle.position),
954
+ ...{ style: ({ top: `${handle.top}%` }) },
955
+ }, ...__VLS_functionalComponentArgsRest(__VLS_142));
956
+ // @ts-ignore
957
+ [];
958
+ }
959
+ // @ts-ignore
960
+ [];
961
+ }
962
+ // @ts-ignore
963
+ [];
964
+ var __VLS_88;
965
+ var __VLS_89;
966
+ __VLS_asFunctionalElement1(__VLS_intrinsics.aside, __VLS_intrinsics.aside)({
967
+ ...{ class: "source-model__relation-panel" },
968
+ });
969
+ /** @type {__VLS_StyleScopedClasses['source-model__relation-panel']} */ ;
970
+ if (selectedRelation.value) {
971
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
972
+ ...{ class: "source-model__relation-heading" },
973
+ });
974
+ /** @type {__VLS_StyleScopedClasses['source-model__relation-heading']} */ ;
975
+ __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({});
976
+ (__VLS_unwrap(t, {})('bi.source.model.field.relation'));
977
+ let __VLS_146;
978
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
979
+ elButton;
980
+ // @ts-ignore
981
+ const __VLS_147 = __VLS_asFunctionalComponent1(__VLS_146, new __VLS_146({
982
+ // @ts-ignore
983
+ ...{ 'onClick': {} }, text: true, type: "danger", icon: (__VLS_unwrap(Delete, {})),
984
+ }));
985
+ const __VLS_148 = __VLS_147({
986
+ ...{ 'onClick': {} },
987
+ text: true,
988
+ type: "danger",
989
+ icon: (__VLS_unwrap(Delete, {})),
990
+ }, ...__VLS_functionalComponentArgsRest(__VLS_147));
991
+ let __VLS_151;
992
+ const __VLS_152 = {
993
+ /** @type {typeof __VLS_151.click} */
994
+ onClick: (removeRelation),
995
+ };
996
+ void __VLS_152;
997
+ var __VLS_149;
998
+ var __VLS_150;
999
+ let __VLS_153;
1000
+ /** @ts-ignore @type { | typeof __VLS_components.elForm | typeof __VLS_components.ElForm | typeof __VLS_components['el-form'] | typeof __VLS_components.elForm | typeof __VLS_components.ElForm | typeof __VLS_components['el-form']} */
1001
+ elForm;
1002
+ // @ts-ignore
1003
+ const __VLS_154 = __VLS_asFunctionalComponent1(__VLS_153, new __VLS_153({
1004
+ // @ts-ignore
1005
+ labelPosition: "top",
1006
+ }));
1007
+ const __VLS_155 = __VLS_154({
1008
+ labelPosition: "top",
1009
+ }, ...__VLS_functionalComponentArgsRest(__VLS_154));
1010
+ const { default: __VLS_158 } = __VLS_nonNull(__VLS_156.slots);
1011
+ let __VLS_159;
1012
+ /** @ts-ignore @type { | typeof __VLS_components.elFormItem | typeof __VLS_components.ElFormItem | typeof __VLS_components['el-form-item'] | typeof __VLS_components.elFormItem | typeof __VLS_components.ElFormItem | typeof __VLS_components['el-form-item']} */
1013
+ elFormItem;
1014
+ // @ts-ignore
1015
+ const __VLS_160 = __VLS_asFunctionalComponent1(__VLS_159, new __VLS_159({
1016
+ // @ts-ignore
1017
+ label: (schemaLabel(tableFor(selectedRelation.value.left_table), selectedRelation.value.left_table)),
1018
+ }));
1019
+ const __VLS_161 = __VLS_160({
1020
+ label: (schemaLabel(tableFor(selectedRelation.value.left_table), selectedRelation.value.left_table)),
1021
+ }, ...__VLS_functionalComponentArgsRest(__VLS_160));
1022
+ const { default: __VLS_164 } = __VLS_nonNull(__VLS_162.slots);
1023
+ let __VLS_165;
1024
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
1025
+ elSelect;
1026
+ // @ts-ignore
1027
+ const __VLS_166 = __VLS_asFunctionalComponent1(__VLS_165, new __VLS_165({
1028
+ // @ts-ignore
1029
+ modelValue: (selectedRelation.value.left_column), placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.left_column')),
1030
+ }));
1031
+ const __VLS_167 = __VLS_166({
1032
+ modelValue: (selectedRelation.value.left_column),
1033
+ placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.left_column')),
1034
+ }, ...__VLS_functionalComponentArgsRest(__VLS_166));
1035
+ const { default: __VLS_170 } = __VLS_nonNull(__VLS_168.slots);
1036
+ const __VLS_171 = __VLS_tryAsConstant((tableFor(selectedRelation.value.left_table)?.columns));
1037
+ for (const [column] of __VLS_vFor(__VLS_nonNull(__VLS_171))) {
1038
+ let __VLS_172;
1039
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
1040
+ elOption;
1041
+ // @ts-ignore
1042
+ const __VLS_173 = __VLS_asFunctionalComponent1(__VLS_172, new __VLS_172({
1043
+ // @ts-ignore
1044
+ key: (column.name), label: (schemaLabel(column)), value: (column.name),
1045
+ }));
1046
+ const __VLS_174 = __VLS_173({
1047
+ key: (column.name),
1048
+ label: (schemaLabel(column)),
1049
+ value: (column.name),
1050
+ }, ...__VLS_functionalComponentArgsRest(__VLS_173));
1051
+ // @ts-ignore
1052
+ [t, t, selectedRelation, selectedRelation, selectedRelation, selectedRelation, selectedRelation, Delete,];
1053
+ }
1054
+ // @ts-ignore
1055
+ [];
1056
+ var __VLS_168;
1057
+ // @ts-ignore
1058
+ [];
1059
+ var __VLS_162;
1060
+ let __VLS_177;
1061
+ /** @ts-ignore @type { | typeof __VLS_components.elFormItem | typeof __VLS_components.ElFormItem | typeof __VLS_components['el-form-item'] | typeof __VLS_components.elFormItem | typeof __VLS_components.ElFormItem | typeof __VLS_components['el-form-item']} */
1062
+ elFormItem;
1063
+ // @ts-ignore
1064
+ const __VLS_178 = __VLS_asFunctionalComponent1(__VLS_177, new __VLS_177({
1065
+ // @ts-ignore
1066
+ label: (schemaLabel(tableFor(selectedRelation.value.right_table), selectedRelation.value.right_table)),
1067
+ }));
1068
+ const __VLS_179 = __VLS_178({
1069
+ label: (schemaLabel(tableFor(selectedRelation.value.right_table), selectedRelation.value.right_table)),
1070
+ }, ...__VLS_functionalComponentArgsRest(__VLS_178));
1071
+ const { default: __VLS_182 } = __VLS_nonNull(__VLS_180.slots);
1072
+ let __VLS_183;
1073
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
1074
+ elSelect;
1075
+ // @ts-ignore
1076
+ const __VLS_184 = __VLS_asFunctionalComponent1(__VLS_183, new __VLS_183({
1077
+ // @ts-ignore
1078
+ modelValue: (selectedRelation.value.right_column), placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.right_unique_column')),
1079
+ }));
1080
+ const __VLS_185 = __VLS_184({
1081
+ modelValue: (selectedRelation.value.right_column),
1082
+ placeholder: (__VLS_unwrap(t, {})('bi.source.model.field.right_unique_column')),
1083
+ }, ...__VLS_functionalComponentArgsRest(__VLS_184));
1084
+ const { default: __VLS_188 } = __VLS_nonNull(__VLS_186.slots);
1085
+ const __VLS_189 = __VLS_tryAsConstant((uniqueColumns(selectedRelation.value.right_table)));
1086
+ for (const [column] of __VLS_vFor(__VLS_nonNull(__VLS_189))) {
1087
+ let __VLS_190;
1088
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
1089
+ elOption;
1090
+ // @ts-ignore
1091
+ const __VLS_191 = __VLS_asFunctionalComponent1(__VLS_190, new __VLS_190({
1092
+ // @ts-ignore
1093
+ key: (column.name), label: (schemaLabel(column)), value: (column.name),
1094
+ }));
1095
+ const __VLS_192 = __VLS_191({
1096
+ key: (column.name),
1097
+ label: (schemaLabel(column)),
1098
+ value: (column.name),
1099
+ }, ...__VLS_functionalComponentArgsRest(__VLS_191));
1100
+ // @ts-ignore
1101
+ [t, selectedRelation, selectedRelation, selectedRelation, selectedRelation,];
1102
+ }
1103
+ // @ts-ignore
1104
+ [];
1105
+ var __VLS_186;
1106
+ // @ts-ignore
1107
+ [];
1108
+ var __VLS_180;
1109
+ let __VLS_195;
1110
+ /** @ts-ignore @type { | typeof __VLS_components.elFormItem | typeof __VLS_components.ElFormItem | typeof __VLS_components['el-form-item'] | typeof __VLS_components.elFormItem | typeof __VLS_components.ElFormItem | typeof __VLS_components['el-form-item']} */
1111
+ elFormItem;
1112
+ // @ts-ignore
1113
+ const __VLS_196 = __VLS_asFunctionalComponent1(__VLS_195, new __VLS_195({
1114
+ // @ts-ignore
1115
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.join_type')),
1116
+ }));
1117
+ const __VLS_197 = __VLS_196({
1118
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.join_type')),
1119
+ }, ...__VLS_functionalComponentArgsRest(__VLS_196));
1120
+ const { default: __VLS_200 } = __VLS_nonNull(__VLS_198.slots);
1121
+ let __VLS_201;
1122
+ /** @ts-ignore @type { | typeof __VLS_components.elRadioGroup | typeof __VLS_components.ElRadioGroup | typeof __VLS_components['el-radio-group'] | typeof __VLS_components.elRadioGroup | typeof __VLS_components.ElRadioGroup | typeof __VLS_components['el-radio-group']} */
1123
+ elRadioGroup;
1124
+ // @ts-ignore
1125
+ const __VLS_202 = __VLS_asFunctionalComponent1(__VLS_201, new __VLS_201({
1126
+ // @ts-ignore
1127
+ modelValue: (selectedRelation.value.join_type),
1128
+ }));
1129
+ const __VLS_203 = __VLS_202({
1130
+ modelValue: (selectedRelation.value.join_type),
1131
+ }, ...__VLS_functionalComponentArgsRest(__VLS_202));
1132
+ const { default: __VLS_206 } = __VLS_nonNull(__VLS_204.slots);
1133
+ let __VLS_207;
1134
+ /** @ts-ignore @type { | typeof __VLS_components.elRadioButton | typeof __VLS_components.ElRadioButton | typeof __VLS_components['el-radio-button'] | typeof __VLS_components.elRadioButton | typeof __VLS_components.ElRadioButton | typeof __VLS_components['el-radio-button']} */
1135
+ elRadioButton;
1136
+ // @ts-ignore
1137
+ const __VLS_208 = __VLS_asFunctionalComponent1(__VLS_207, new __VLS_207({
1138
+ // @ts-ignore
1139
+ value: "left",
1140
+ }));
1141
+ const __VLS_209 = __VLS_208({
1142
+ value: "left",
1143
+ }, ...__VLS_functionalComponentArgsRest(__VLS_208));
1144
+ const { default: __VLS_212 } = __VLS_nonNull(__VLS_210.slots);
1145
+ // @ts-ignore
1146
+ [t, selectedRelation,];
1147
+ var __VLS_210;
1148
+ let __VLS_213;
1149
+ /** @ts-ignore @type { | typeof __VLS_components.elRadioButton | typeof __VLS_components.ElRadioButton | typeof __VLS_components['el-radio-button'] | typeof __VLS_components.elRadioButton | typeof __VLS_components.ElRadioButton | typeof __VLS_components['el-radio-button']} */
1150
+ elRadioButton;
1151
+ // @ts-ignore
1152
+ const __VLS_214 = __VLS_asFunctionalComponent1(__VLS_213, new __VLS_213({
1153
+ // @ts-ignore
1154
+ value: "inner",
1155
+ }));
1156
+ const __VLS_215 = __VLS_214({
1157
+ value: "inner",
1158
+ }, ...__VLS_functionalComponentArgsRest(__VLS_214));
1159
+ const { default: __VLS_218 } = __VLS_nonNull(__VLS_216.slots);
1160
+ // @ts-ignore
1161
+ [];
1162
+ var __VLS_216;
1163
+ // @ts-ignore
1164
+ [];
1165
+ var __VLS_204;
1166
+ // @ts-ignore
1167
+ [];
1168
+ var __VLS_198;
1169
+ // @ts-ignore
1170
+ [];
1171
+ var __VLS_156;
1172
+ }
1173
+ else {
1174
+ let __VLS_219;
1175
+ /** @ts-ignore @type { | typeof __VLS_components.elEmpty | typeof __VLS_components.ElEmpty | typeof __VLS_components['el-empty']} */
1176
+ elEmpty;
1177
+ // @ts-ignore
1178
+ const __VLS_220 = __VLS_asFunctionalComponent1(__VLS_219, new __VLS_219({
1179
+ // @ts-ignore
1180
+ description: (__VLS_unwrap(t, {})('bi.source.model.relation_empty')), imageSize: (72),
1181
+ }));
1182
+ const __VLS_221 = __VLS_220({
1183
+ description: (__VLS_unwrap(t, {})('bi.source.model.relation_empty')),
1184
+ imageSize: (72),
1185
+ }, ...__VLS_functionalComponentArgsRest(__VLS_220));
1186
+ }
1187
+ }
1188
+ else {
1189
+ __VLS_asFunctionalElement1(__VLS_intrinsics.section, __VLS_intrinsics.section)({
1190
+ ...{ class: "source-model__semantics" },
1191
+ });
1192
+ /** @type {__VLS_StyleScopedClasses['source-model__semantics']} */ ;
1193
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
1194
+ ...{ class: "source-model__semantic-section" },
1195
+ });
1196
+ /** @type {__VLS_StyleScopedClasses['source-model__semantic-section']} */ ;
1197
+ __VLS_asFunctionalElement1(__VLS_intrinsics.header, __VLS_intrinsics.header)({});
1198
+ __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({});
1199
+ (__VLS_unwrap(t, {})('bi.source.model.field.dimensions'));
1200
+ let __VLS_224;
1201
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1202
+ elButton;
1203
+ // @ts-ignore
1204
+ const __VLS_225 = __VLS_asFunctionalComponent1(__VLS_224, new __VLS_224({
1205
+ // @ts-ignore
1206
+ ...{ 'onClick': {} }, size: "small", icon: (__VLS_unwrap(CirclePlus, {})),
1207
+ }));
1208
+ const __VLS_226 = __VLS_225({
1209
+ ...{ 'onClick': {} },
1210
+ size: "small",
1211
+ icon: (__VLS_unwrap(CirclePlus, {})),
1212
+ }, ...__VLS_functionalComponentArgsRest(__VLS_225));
1213
+ let __VLS_229;
1214
+ const __VLS_230 = {
1215
+ /** @type {typeof __VLS_229.click} */
1216
+ onClick: (addDimension),
1217
+ };
1218
+ void __VLS_230;
1219
+ const { default: __VLS_231 } = __VLS_nonNull(__VLS_227.slots);
1220
+ (__VLS_unwrap(t, {})('bi.source.model.action.add_dimension'));
1221
+ // @ts-ignore
1222
+ [t, t, t, CirclePlus,];
1223
+ var __VLS_227;
1224
+ var __VLS_228;
1225
+ let __VLS_232;
1226
+ /** @ts-ignore @type { | typeof __VLS_components.elTable | typeof __VLS_components.ElTable | typeof __VLS_components['el-table'] | typeof __VLS_components.elTable | typeof __VLS_components.ElTable | typeof __VLS_components['el-table']} */
1227
+ elTable;
1228
+ // @ts-ignore
1229
+ const __VLS_233 = __VLS_asFunctionalComponent1(__VLS_232, new __VLS_232({
1230
+ // @ts-ignore
1231
+ data: (model.value.dimensions), size: "small", border: true,
1232
+ }));
1233
+ const __VLS_234 = __VLS_233({
1234
+ data: (model.value.dimensions),
1235
+ size: "small",
1236
+ border: true,
1237
+ }, ...__VLS_functionalComponentArgsRest(__VLS_233));
1238
+ const { default: __VLS_237 } = __VLS_nonNull(__VLS_235.slots);
1239
+ let __VLS_238;
1240
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1241
+ elTableColumn;
1242
+ // @ts-ignore
1243
+ const __VLS_239 = __VLS_asFunctionalComponent1(__VLS_238, new __VLS_238({
1244
+ // @ts-ignore
1245
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.code')), minWidth: "135",
1246
+ }));
1247
+ const __VLS_240 = __VLS_239({
1248
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.code')),
1249
+ minWidth: "135",
1250
+ }, ...__VLS_functionalComponentArgsRest(__VLS_239));
1251
+ const { default: __VLS_243 } = __VLS_nonNull(__VLS_241.slots);
1252
+ {
1253
+ const { default: __VLS_244 } = __VLS_nonNull(__VLS_241.slots);
1254
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_244));
1255
+ let __VLS_245;
1256
+ /** @ts-ignore @type { | typeof __VLS_components.elInput | typeof __VLS_components.ElInput | typeof __VLS_components['el-input']} */
1257
+ elInput;
1258
+ // @ts-ignore
1259
+ const __VLS_246 = __VLS_asFunctionalComponent1(__VLS_245, new __VLS_245({
1260
+ // @ts-ignore
1261
+ modelValue: (row.code),
1262
+ }));
1263
+ const __VLS_247 = __VLS_246({
1264
+ modelValue: (row.code),
1265
+ }, ...__VLS_functionalComponentArgsRest(__VLS_246));
1266
+ // @ts-ignore
1267
+ [t, model,];
1268
+ }
1269
+ // @ts-ignore
1270
+ [];
1271
+ var __VLS_241;
1272
+ let __VLS_250;
1273
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1274
+ elTableColumn;
1275
+ // @ts-ignore
1276
+ const __VLS_251 = __VLS_asFunctionalComponent1(__VLS_250, new __VLS_250({
1277
+ // @ts-ignore
1278
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.display_name')), minWidth: "135",
1279
+ }));
1280
+ const __VLS_252 = __VLS_251({
1281
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.display_name')),
1282
+ minWidth: "135",
1283
+ }, ...__VLS_functionalComponentArgsRest(__VLS_251));
1284
+ const { default: __VLS_255 } = __VLS_nonNull(__VLS_253.slots);
1285
+ {
1286
+ const { default: __VLS_256 } = __VLS_nonNull(__VLS_253.slots);
1287
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_256));
1288
+ let __VLS_257;
1289
+ /** @ts-ignore @type { | typeof __VLS_components.elInput | typeof __VLS_components.ElInput | typeof __VLS_components['el-input']} */
1290
+ elInput;
1291
+ // @ts-ignore
1292
+ const __VLS_258 = __VLS_asFunctionalComponent1(__VLS_257, new __VLS_257({
1293
+ // @ts-ignore
1294
+ modelValue: (row.name),
1295
+ }));
1296
+ const __VLS_259 = __VLS_258({
1297
+ modelValue: (row.name),
1298
+ }, ...__VLS_functionalComponentArgsRest(__VLS_258));
1299
+ // @ts-ignore
1300
+ [t,];
1301
+ }
1302
+ // @ts-ignore
1303
+ [];
1304
+ var __VLS_253;
1305
+ let __VLS_262;
1306
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1307
+ elTableColumn;
1308
+ // @ts-ignore
1309
+ const __VLS_263 = __VLS_asFunctionalComponent1(__VLS_262, new __VLS_262({
1310
+ // @ts-ignore
1311
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.table')), minWidth: "160",
1312
+ }));
1313
+ const __VLS_264 = __VLS_263({
1314
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.table')),
1315
+ minWidth: "160",
1316
+ }, ...__VLS_functionalComponentArgsRest(__VLS_263));
1317
+ const { default: __VLS_267 } = __VLS_nonNull(__VLS_265.slots);
1318
+ {
1319
+ const { default: __VLS_268 } = __VLS_nonNull(__VLS_265.slots);
1320
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_268));
1321
+ let __VLS_269;
1322
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
1323
+ elSelect;
1324
+ // @ts-ignore
1325
+ const __VLS_270 = __VLS_asFunctionalComponent1(__VLS_269, new __VLS_269({
1326
+ // @ts-ignore
1327
+ ...{ 'onChange': {} }, modelValue: (row.table),
1328
+ }));
1329
+ const __VLS_271 = __VLS_270({
1330
+ ...{ 'onChange': {} },
1331
+ modelValue: (row.table),
1332
+ }, ...__VLS_functionalComponentArgsRest(__VLS_270));
1333
+ let __VLS_274;
1334
+ const __VLS_275 = {
1335
+ /** @type {typeof __VLS_274.change} */
1336
+ onChange: // @ts-ignore
1337
+ (...[$event]) => {
1338
+ void $event;
1339
+ if (!!(step.value === 0))
1340
+ throw 0;
1341
+ if (!!(step.value === 1))
1342
+ throw 0;
1343
+ row.column = '';
1344
+ row.type = 'string';
1345
+ // @ts-ignore
1346
+ [t,];
1347
+ },
1348
+ };
1349
+ void __VLS_275;
1350
+ const { default: __VLS_276 } = __VLS_nonNull(__VLS_272.slots);
1351
+ const __VLS_277 = __VLS_tryAsConstant((selectedTables.value));
1352
+ for (const [table] of __VLS_vFor(__VLS_nonNull(__VLS_277))) {
1353
+ let __VLS_278;
1354
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
1355
+ elOption;
1356
+ // @ts-ignore
1357
+ const __VLS_279 = __VLS_asFunctionalComponent1(__VLS_278, new __VLS_278({
1358
+ // @ts-ignore
1359
+ key: (table.key), label: (schemaLabel(table)), value: (table.key),
1360
+ }));
1361
+ const __VLS_280 = __VLS_279({
1362
+ key: (table.key),
1363
+ label: (schemaLabel(table)),
1364
+ value: (table.key),
1365
+ }, ...__VLS_functionalComponentArgsRest(__VLS_279));
1366
+ // @ts-ignore
1367
+ [selectedTables,];
1368
+ }
1369
+ // @ts-ignore
1370
+ [];
1371
+ var __VLS_272;
1372
+ var __VLS_273;
1373
+ // @ts-ignore
1374
+ [];
1375
+ }
1376
+ // @ts-ignore
1377
+ [];
1378
+ var __VLS_265;
1379
+ let __VLS_283;
1380
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1381
+ elTableColumn;
1382
+ // @ts-ignore
1383
+ const __VLS_284 = __VLS_asFunctionalComponent1(__VLS_283, new __VLS_283({
1384
+ // @ts-ignore
1385
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.column')), minWidth: "160",
1386
+ }));
1387
+ const __VLS_285 = __VLS_284({
1388
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.column')),
1389
+ minWidth: "160",
1390
+ }, ...__VLS_functionalComponentArgsRest(__VLS_284));
1391
+ const { default: __VLS_288 } = __VLS_nonNull(__VLS_286.slots);
1392
+ {
1393
+ const { default: __VLS_289 } = __VLS_nonNull(__VLS_286.slots);
1394
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_289));
1395
+ let __VLS_290;
1396
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
1397
+ elSelect;
1398
+ // @ts-ignore
1399
+ const __VLS_291 = __VLS_asFunctionalComponent1(__VLS_290, new __VLS_290({
1400
+ // @ts-ignore
1401
+ ...{ 'onChange': {} }, modelValue: (row.column),
1402
+ }));
1403
+ const __VLS_292 = __VLS_291({
1404
+ ...{ 'onChange': {} },
1405
+ modelValue: (row.column),
1406
+ }, ...__VLS_functionalComponentArgsRest(__VLS_291));
1407
+ let __VLS_295;
1408
+ const __VLS_296 = {
1409
+ /** @type {typeof __VLS_295.change} */
1410
+ onChange: // @ts-ignore
1411
+ (...[$event]) => {
1412
+ void $event;
1413
+ if (!!(step.value === 0))
1414
+ throw 0;
1415
+ if (!!(step.value === 1))
1416
+ throw 0;
1417
+ return (row.type = fieldType(row.table, row.column));
1418
+ // @ts-ignore
1419
+ [t,];
1420
+ },
1421
+ };
1422
+ void __VLS_296;
1423
+ const { default: __VLS_297 } = __VLS_nonNull(__VLS_293.slots);
1424
+ const __VLS_298 = __VLS_tryAsConstant((tableFor(row.table)?.columns));
1425
+ for (const [column] of __VLS_vFor(__VLS_nonNull(__VLS_298))) {
1426
+ let __VLS_299;
1427
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
1428
+ elOption;
1429
+ // @ts-ignore
1430
+ const __VLS_300 = __VLS_asFunctionalComponent1(__VLS_299, new __VLS_299({
1431
+ // @ts-ignore
1432
+ key: (column.name), label: (schemaLabel(column)), value: (column.name),
1433
+ }));
1434
+ const __VLS_301 = __VLS_300({
1435
+ key: (column.name),
1436
+ label: (schemaLabel(column)),
1437
+ value: (column.name),
1438
+ }, ...__VLS_functionalComponentArgsRest(__VLS_300));
1439
+ // @ts-ignore
1440
+ [];
1441
+ }
1442
+ // @ts-ignore
1443
+ [];
1444
+ var __VLS_293;
1445
+ var __VLS_294;
1446
+ // @ts-ignore
1447
+ [];
1448
+ }
1449
+ // @ts-ignore
1450
+ [];
1451
+ var __VLS_286;
1452
+ let __VLS_304;
1453
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1454
+ elTableColumn;
1455
+ // @ts-ignore
1456
+ const __VLS_305 = __VLS_asFunctionalComponent1(__VLS_304, new __VLS_304({
1457
+ // @ts-ignore
1458
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.type')), width: "110",
1459
+ }));
1460
+ const __VLS_306 = __VLS_305({
1461
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.type')),
1462
+ width: "110",
1463
+ }, ...__VLS_functionalComponentArgsRest(__VLS_305));
1464
+ const { default: __VLS_309 } = __VLS_nonNull(__VLS_307.slots);
1465
+ {
1466
+ const { default: __VLS_310 } = __VLS_nonNull(__VLS_307.slots);
1467
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_310));
1468
+ (row.type);
1469
+ // @ts-ignore
1470
+ [t,];
1471
+ }
1472
+ // @ts-ignore
1473
+ [];
1474
+ var __VLS_307;
1475
+ let __VLS_311;
1476
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1477
+ elTableColumn;
1478
+ // @ts-ignore
1479
+ const __VLS_312 = __VLS_asFunctionalComponent1(__VLS_311, new __VLS_311({
1480
+ // @ts-ignore
1481
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.filterable')), width: "115", align: "center",
1482
+ }));
1483
+ const __VLS_313 = __VLS_312({
1484
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.filterable')),
1485
+ width: "115",
1486
+ align: "center",
1487
+ }, ...__VLS_functionalComponentArgsRest(__VLS_312));
1488
+ const { default: __VLS_316 } = __VLS_nonNull(__VLS_314.slots);
1489
+ {
1490
+ const { default: __VLS_317 } = __VLS_nonNull(__VLS_314.slots);
1491
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_317));
1492
+ let __VLS_318;
1493
+ /** @ts-ignore @type { | typeof __VLS_components.elSwitch | typeof __VLS_components.ElSwitch | typeof __VLS_components['el-switch']} */
1494
+ elSwitch;
1495
+ // @ts-ignore
1496
+ const __VLS_319 = __VLS_asFunctionalComponent1(__VLS_318, new __VLS_318({
1497
+ // @ts-ignore
1498
+ modelValue: (row.filterable),
1499
+ }));
1500
+ const __VLS_320 = __VLS_319({
1501
+ modelValue: (row.filterable),
1502
+ }, ...__VLS_functionalComponentArgsRest(__VLS_319));
1503
+ // @ts-ignore
1504
+ [t,];
1505
+ }
1506
+ // @ts-ignore
1507
+ [];
1508
+ var __VLS_314;
1509
+ let __VLS_323;
1510
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1511
+ elTableColumn;
1512
+ // @ts-ignore
1513
+ const __VLS_324 = __VLS_asFunctionalComponent1(__VLS_323, new __VLS_323({
1514
+ // @ts-ignore
1515
+ width: "64", align: "center",
1516
+ }));
1517
+ const __VLS_325 = __VLS_324({
1518
+ width: "64",
1519
+ align: "center",
1520
+ }, ...__VLS_functionalComponentArgsRest(__VLS_324));
1521
+ const { default: __VLS_328 } = __VLS_nonNull(__VLS_326.slots);
1522
+ {
1523
+ const { default: __VLS_329 } = __VLS_nonNull(__VLS_326.slots);
1524
+ const [{ $index }] = __VLS_vSlot(__VLS_nonNull(__VLS_329));
1525
+ let __VLS_330;
1526
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1527
+ elButton;
1528
+ // @ts-ignore
1529
+ const __VLS_331 = __VLS_asFunctionalComponent1(__VLS_330, new __VLS_330({
1530
+ // @ts-ignore
1531
+ ...{ 'onClick': {} }, text: true, type: "danger", icon: (__VLS_unwrap(Delete, {})),
1532
+ }));
1533
+ const __VLS_332 = __VLS_331({
1534
+ ...{ 'onClick': {} },
1535
+ text: true,
1536
+ type: "danger",
1537
+ icon: (__VLS_unwrap(Delete, {})),
1538
+ }, ...__VLS_functionalComponentArgsRest(__VLS_331));
1539
+ let __VLS_335;
1540
+ const __VLS_336 = {
1541
+ /** @type {typeof __VLS_335.click} */
1542
+ onClick: // @ts-ignore
1543
+ (...[$event]) => {
1544
+ void $event;
1545
+ if (!!(step.value === 0))
1546
+ throw 0;
1547
+ if (!!(step.value === 1))
1548
+ throw 0;
1549
+ return (model.value.dimensions.splice($index, 1));
1550
+ // @ts-ignore
1551
+ [model, Delete,];
1552
+ },
1553
+ };
1554
+ void __VLS_336;
1555
+ var __VLS_333;
1556
+ var __VLS_334;
1557
+ // @ts-ignore
1558
+ [];
1559
+ }
1560
+ // @ts-ignore
1561
+ [];
1562
+ var __VLS_326;
1563
+ // @ts-ignore
1564
+ [];
1565
+ var __VLS_235;
1566
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
1567
+ ...{ class: "source-model__semantic-section" },
1568
+ });
1569
+ /** @type {__VLS_StyleScopedClasses['source-model__semantic-section']} */ ;
1570
+ __VLS_asFunctionalElement1(__VLS_intrinsics.header, __VLS_intrinsics.header)({});
1571
+ __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({});
1572
+ (__VLS_unwrap(t, {})('bi.source.model.field.measures'));
1573
+ let __VLS_337;
1574
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1575
+ elButton;
1576
+ // @ts-ignore
1577
+ const __VLS_338 = __VLS_asFunctionalComponent1(__VLS_337, new __VLS_337({
1578
+ // @ts-ignore
1579
+ ...{ 'onClick': {} }, size: "small", icon: (__VLS_unwrap(CirclePlus, {})),
1580
+ }));
1581
+ const __VLS_339 = __VLS_338({
1582
+ ...{ 'onClick': {} },
1583
+ size: "small",
1584
+ icon: (__VLS_unwrap(CirclePlus, {})),
1585
+ }, ...__VLS_functionalComponentArgsRest(__VLS_338));
1586
+ let __VLS_342;
1587
+ const __VLS_343 = {
1588
+ /** @type {typeof __VLS_342.click} */
1589
+ onClick: (addMeasure),
1590
+ };
1591
+ void __VLS_343;
1592
+ const { default: __VLS_344 } = __VLS_nonNull(__VLS_340.slots);
1593
+ (__VLS_unwrap(t, {})('bi.source.model.action.add_measure'));
1594
+ // @ts-ignore
1595
+ [t, t, CirclePlus,];
1596
+ var __VLS_340;
1597
+ var __VLS_341;
1598
+ let __VLS_345;
1599
+ /** @ts-ignore @type { | typeof __VLS_components.elTable | typeof __VLS_components.ElTable | typeof __VLS_components['el-table'] | typeof __VLS_components.elTable | typeof __VLS_components.ElTable | typeof __VLS_components['el-table']} */
1600
+ elTable;
1601
+ // @ts-ignore
1602
+ const __VLS_346 = __VLS_asFunctionalComponent1(__VLS_345, new __VLS_345({
1603
+ // @ts-ignore
1604
+ data: (model.value.measures), size: "small", border: true,
1605
+ }));
1606
+ const __VLS_347 = __VLS_346({
1607
+ data: (model.value.measures),
1608
+ size: "small",
1609
+ border: true,
1610
+ }, ...__VLS_functionalComponentArgsRest(__VLS_346));
1611
+ const { default: __VLS_350 } = __VLS_nonNull(__VLS_348.slots);
1612
+ let __VLS_351;
1613
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1614
+ elTableColumn;
1615
+ // @ts-ignore
1616
+ const __VLS_352 = __VLS_asFunctionalComponent1(__VLS_351, new __VLS_351({
1617
+ // @ts-ignore
1618
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.code')), minWidth: "135",
1619
+ }));
1620
+ const __VLS_353 = __VLS_352({
1621
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.code')),
1622
+ minWidth: "135",
1623
+ }, ...__VLS_functionalComponentArgsRest(__VLS_352));
1624
+ const { default: __VLS_356 } = __VLS_nonNull(__VLS_354.slots);
1625
+ {
1626
+ const { default: __VLS_357 } = __VLS_nonNull(__VLS_354.slots);
1627
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_357));
1628
+ let __VLS_358;
1629
+ /** @ts-ignore @type { | typeof __VLS_components.elInput | typeof __VLS_components.ElInput | typeof __VLS_components['el-input']} */
1630
+ elInput;
1631
+ // @ts-ignore
1632
+ const __VLS_359 = __VLS_asFunctionalComponent1(__VLS_358, new __VLS_358({
1633
+ // @ts-ignore
1634
+ modelValue: (row.code),
1635
+ }));
1636
+ const __VLS_360 = __VLS_359({
1637
+ modelValue: (row.code),
1638
+ }, ...__VLS_functionalComponentArgsRest(__VLS_359));
1639
+ // @ts-ignore
1640
+ [t, model,];
1641
+ }
1642
+ // @ts-ignore
1643
+ [];
1644
+ var __VLS_354;
1645
+ let __VLS_363;
1646
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1647
+ elTableColumn;
1648
+ // @ts-ignore
1649
+ const __VLS_364 = __VLS_asFunctionalComponent1(__VLS_363, new __VLS_363({
1650
+ // @ts-ignore
1651
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.display_name')), minWidth: "135",
1652
+ }));
1653
+ const __VLS_365 = __VLS_364({
1654
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.display_name')),
1655
+ minWidth: "135",
1656
+ }, ...__VLS_functionalComponentArgsRest(__VLS_364));
1657
+ const { default: __VLS_368 } = __VLS_nonNull(__VLS_366.slots);
1658
+ {
1659
+ const { default: __VLS_369 } = __VLS_nonNull(__VLS_366.slots);
1660
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_369));
1661
+ let __VLS_370;
1662
+ /** @ts-ignore @type { | typeof __VLS_components.elInput | typeof __VLS_components.ElInput | typeof __VLS_components['el-input']} */
1663
+ elInput;
1664
+ // @ts-ignore
1665
+ const __VLS_371 = __VLS_asFunctionalComponent1(__VLS_370, new __VLS_370({
1666
+ // @ts-ignore
1667
+ modelValue: (row.name),
1668
+ }));
1669
+ const __VLS_372 = __VLS_371({
1670
+ modelValue: (row.name),
1671
+ }, ...__VLS_functionalComponentArgsRest(__VLS_371));
1672
+ // @ts-ignore
1673
+ [t,];
1674
+ }
1675
+ // @ts-ignore
1676
+ [];
1677
+ var __VLS_366;
1678
+ let __VLS_375;
1679
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1680
+ elTableColumn;
1681
+ // @ts-ignore
1682
+ const __VLS_376 = __VLS_asFunctionalComponent1(__VLS_375, new __VLS_375({
1683
+ // @ts-ignore
1684
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.column')), minWidth: "180",
1685
+ }));
1686
+ const __VLS_377 = __VLS_376({
1687
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.column')),
1688
+ minWidth: "180",
1689
+ }, ...__VLS_functionalComponentArgsRest(__VLS_376));
1690
+ const { default: __VLS_380 } = __VLS_nonNull(__VLS_378.slots);
1691
+ {
1692
+ const { default: __VLS_381 } = __VLS_nonNull(__VLS_378.slots);
1693
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_381));
1694
+ let __VLS_382;
1695
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
1696
+ elSelect;
1697
+ // @ts-ignore
1698
+ const __VLS_383 = __VLS_asFunctionalComponent1(__VLS_382, new __VLS_382({
1699
+ // @ts-ignore
1700
+ ...{ 'onChange': {} }, modelValue: (row.column),
1701
+ }));
1702
+ const __VLS_384 = __VLS_383({
1703
+ ...{ 'onChange': {} },
1704
+ modelValue: (row.column),
1705
+ }, ...__VLS_functionalComponentArgsRest(__VLS_383));
1706
+ let __VLS_387;
1707
+ const __VLS_388 = {
1708
+ /** @type {typeof __VLS_387.change} */
1709
+ onChange: // @ts-ignore
1710
+ (...[$event]) => {
1711
+ void $event;
1712
+ if (!!(step.value === 0))
1713
+ throw 0;
1714
+ if (!!(step.value === 1))
1715
+ throw 0;
1716
+ row.type = 'number';
1717
+ row.aggregations = defaultAggregations(row.column);
1718
+ // @ts-ignore
1719
+ [t,];
1720
+ },
1721
+ };
1722
+ void __VLS_388;
1723
+ const { default: __VLS_389 } = __VLS_nonNull(__VLS_385.slots);
1724
+ const __VLS_390 = __VLS_tryAsConstant((tableFor(model.value.base_table)?.columns));
1725
+ for (const [column] of __VLS_vFor(__VLS_nonNull(__VLS_390))) {
1726
+ let __VLS_391;
1727
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
1728
+ elOption;
1729
+ // @ts-ignore
1730
+ const __VLS_392 = __VLS_asFunctionalComponent1(__VLS_391, new __VLS_391({
1731
+ // @ts-ignore
1732
+ key: (column.name), label: (schemaLabel(column)), value: (column.name),
1733
+ }));
1734
+ const __VLS_393 = __VLS_392({
1735
+ key: (column.name),
1736
+ label: (schemaLabel(column)),
1737
+ value: (column.name),
1738
+ }, ...__VLS_functionalComponentArgsRest(__VLS_392));
1739
+ // @ts-ignore
1740
+ [model,];
1741
+ }
1742
+ // @ts-ignore
1743
+ [];
1744
+ var __VLS_385;
1745
+ var __VLS_386;
1746
+ // @ts-ignore
1747
+ [];
1748
+ }
1749
+ // @ts-ignore
1750
+ [];
1751
+ var __VLS_378;
1752
+ let __VLS_396;
1753
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1754
+ elTableColumn;
1755
+ // @ts-ignore
1756
+ const __VLS_397 = __VLS_asFunctionalComponent1(__VLS_396, new __VLS_396({
1757
+ // @ts-ignore
1758
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.aggregation')), minWidth: "220",
1759
+ }));
1760
+ const __VLS_398 = __VLS_397({
1761
+ label: (__VLS_unwrap(t, {})('bi.source.model.field.aggregation')),
1762
+ minWidth: "220",
1763
+ }, ...__VLS_functionalComponentArgsRest(__VLS_397));
1764
+ const { default: __VLS_401 } = __VLS_nonNull(__VLS_399.slots);
1765
+ {
1766
+ const { default: __VLS_402 } = __VLS_nonNull(__VLS_399.slots);
1767
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_402));
1768
+ let __VLS_403;
1769
+ /** @ts-ignore @type { | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select'] | typeof __VLS_components.elSelect | typeof __VLS_components.ElSelect | typeof __VLS_components['el-select']} */
1770
+ elSelect;
1771
+ // @ts-ignore
1772
+ const __VLS_404 = __VLS_asFunctionalComponent1(__VLS_403, new __VLS_403({
1773
+ // @ts-ignore
1774
+ modelValue: (row.aggregations), multiple: true, collapseTags: true,
1775
+ }));
1776
+ const __VLS_405 = __VLS_404({
1777
+ modelValue: (row.aggregations),
1778
+ multiple: true,
1779
+ collapseTags: true,
1780
+ }, ...__VLS_functionalComponentArgsRest(__VLS_404));
1781
+ const { default: __VLS_408 } = __VLS_nonNull(__VLS_406.slots);
1782
+ const __VLS_409 = __VLS_tryAsConstant((aggregationOptions(row.column)));
1783
+ for (const [aggregation] of __VLS_vFor(__VLS_nonNull(__VLS_409))) {
1784
+ let __VLS_410;
1785
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
1786
+ elOption;
1787
+ // @ts-ignore
1788
+ const __VLS_411 = __VLS_asFunctionalComponent1(__VLS_410, new __VLS_410({
1789
+ // @ts-ignore
1790
+ key: (aggregation), label: (aggregation), value: (aggregation),
1791
+ }));
1792
+ const __VLS_412 = __VLS_411({
1793
+ key: (aggregation),
1794
+ label: (aggregation),
1795
+ value: (aggregation),
1796
+ }, ...__VLS_functionalComponentArgsRest(__VLS_411));
1797
+ // @ts-ignore
1798
+ [t,];
1799
+ }
1800
+ // @ts-ignore
1801
+ [];
1802
+ var __VLS_406;
1803
+ // @ts-ignore
1804
+ [];
1805
+ }
1806
+ // @ts-ignore
1807
+ [];
1808
+ var __VLS_399;
1809
+ let __VLS_415;
1810
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1811
+ elTableColumn;
1812
+ // @ts-ignore
1813
+ const __VLS_416 = __VLS_asFunctionalComponent1(__VLS_415, new __VLS_415({
1814
+ // @ts-ignore
1815
+ width: "64", align: "center",
1816
+ }));
1817
+ const __VLS_417 = __VLS_416({
1818
+ width: "64",
1819
+ align: "center",
1820
+ }, ...__VLS_functionalComponentArgsRest(__VLS_416));
1821
+ const { default: __VLS_420 } = __VLS_nonNull(__VLS_418.slots);
1822
+ {
1823
+ const { default: __VLS_421 } = __VLS_nonNull(__VLS_418.slots);
1824
+ const [{ $index }] = __VLS_vSlot(__VLS_nonNull(__VLS_421));
1825
+ let __VLS_422;
1826
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1827
+ elButton;
1828
+ // @ts-ignore
1829
+ const __VLS_423 = __VLS_asFunctionalComponent1(__VLS_422, new __VLS_422({
1830
+ // @ts-ignore
1831
+ ...{ 'onClick': {} }, text: true, type: "danger", icon: (__VLS_unwrap(Delete, {})),
1832
+ }));
1833
+ const __VLS_424 = __VLS_423({
1834
+ ...{ 'onClick': {} },
1835
+ text: true,
1836
+ type: "danger",
1837
+ icon: (__VLS_unwrap(Delete, {})),
1838
+ }, ...__VLS_functionalComponentArgsRest(__VLS_423));
1839
+ let __VLS_427;
1840
+ const __VLS_428 = {
1841
+ /** @type {typeof __VLS_427.click} */
1842
+ onClick: // @ts-ignore
1843
+ (...[$event]) => {
1844
+ void $event;
1845
+ if (!!(step.value === 0))
1846
+ throw 0;
1847
+ if (!!(step.value === 1))
1848
+ throw 0;
1849
+ return (model.value.measures.splice($index, 1));
1850
+ // @ts-ignore
1851
+ [model, Delete,];
1852
+ },
1853
+ };
1854
+ void __VLS_428;
1855
+ var __VLS_425;
1856
+ var __VLS_426;
1857
+ // @ts-ignore
1858
+ [];
1859
+ }
1860
+ // @ts-ignore
1861
+ [];
1862
+ var __VLS_418;
1863
+ // @ts-ignore
1864
+ [];
1865
+ var __VLS_348;
1866
+ if (previewResult.value) {
1867
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
1868
+ ...{ class: "source-model__preview" },
1869
+ });
1870
+ /** @type {__VLS_StyleScopedClasses['source-model__preview']} */ ;
1871
+ __VLS_asFunctionalElement1(__VLS_intrinsics.header, __VLS_intrinsics.header)({});
1872
+ __VLS_asFunctionalElement1(__VLS_intrinsics.strong, __VLS_intrinsics.strong)({});
1873
+ (__VLS_unwrap(t, {})('bi.query.result'));
1874
+ __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
1875
+ (__VLS_unwrap(t, {})('bi.query.elapsed', { ms: previewResult.value.elapsed_ms }));
1876
+ let __VLS_429;
1877
+ /** @ts-ignore @type { | typeof __VLS_components.elTable | typeof __VLS_components.ElTable | typeof __VLS_components['el-table'] | typeof __VLS_components.elTable | typeof __VLS_components.ElTable | typeof __VLS_components['el-table']} */
1878
+ elTable;
1879
+ // @ts-ignore
1880
+ const __VLS_430 = __VLS_asFunctionalComponent1(__VLS_429, new __VLS_429({
1881
+ // @ts-ignore
1882
+ data: (__VLS_unwrap(previewRows, {})), size: "small", border: true,
1883
+ }));
1884
+ const __VLS_431 = __VLS_430({
1885
+ data: (__VLS_unwrap(previewRows, {})),
1886
+ size: "small",
1887
+ border: true,
1888
+ }, ...__VLS_functionalComponentArgsRest(__VLS_430));
1889
+ const { default: __VLS_434 } = __VLS_nonNull(__VLS_432.slots);
1890
+ const __VLS_435 = __VLS_tryAsConstant((previewResult.value.columns));
1891
+ for (const [column, index] of __VLS_vFor(__VLS_nonNull(__VLS_435))) {
1892
+ let __VLS_436;
1893
+ /** @ts-ignore @type { | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column'] | typeof __VLS_components.elTableColumn | typeof __VLS_components.ElTableColumn | typeof __VLS_components['el-table-column']} */
1894
+ elTableColumn;
1895
+ // @ts-ignore
1896
+ const __VLS_437 = __VLS_asFunctionalComponent1(__VLS_436, new __VLS_436({
1897
+ // @ts-ignore
1898
+ key: (column.code), label: (column.name), minWidth: "130",
1899
+ }));
1900
+ const __VLS_438 = __VLS_437({
1901
+ key: (column.code),
1902
+ label: (column.name),
1903
+ minWidth: "130",
1904
+ }, ...__VLS_functionalComponentArgsRest(__VLS_437));
1905
+ const { default: __VLS_441 } = __VLS_nonNull(__VLS_439.slots);
1906
+ {
1907
+ const { default: __VLS_442 } = __VLS_nonNull(__VLS_439.slots);
1908
+ const [{ row }] = __VLS_vSlot(__VLS_nonNull(__VLS_442));
1909
+ (row[`value_${index}`]);
1910
+ // @ts-ignore
1911
+ [t, t, previewResult, previewResult, previewResult, previewRows,];
1912
+ }
1913
+ // @ts-ignore
1914
+ [];
1915
+ var __VLS_439;
1916
+ // @ts-ignore
1917
+ [];
1918
+ }
1919
+ // @ts-ignore
1920
+ [];
1921
+ var __VLS_432;
1922
+ }
1923
+ }
1924
+ {
1925
+ const { footer: __VLS_443 } = __VLS_nonNull(__VLS_3.slots);
1926
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
1927
+ ...{ class: "source-model__footer" },
1928
+ });
1929
+ /** @type {__VLS_StyleScopedClasses['source-model__footer']} */ ;
1930
+ let __VLS_444;
1931
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1932
+ elButton;
1933
+ // @ts-ignore
1934
+ const __VLS_445 = __VLS_asFunctionalComponent1(__VLS_444, new __VLS_444({
1935
+ // @ts-ignore
1936
+ ...{ 'onClick': {} },
1937
+ }));
1938
+ const __VLS_446 = __VLS_445({
1939
+ ...{ 'onClick': {} },
1940
+ }, ...__VLS_functionalComponentArgsRest(__VLS_445));
1941
+ let __VLS_449;
1942
+ const __VLS_450 = {
1943
+ /** @type {typeof __VLS_449.click} */
1944
+ onClick: // @ts-ignore
1945
+ (...[$event]) => {
1946
+ void $event;
1947
+ return (open.value = false);
1948
+ // @ts-ignore
1949
+ [open,];
1950
+ },
1951
+ };
1952
+ void __VLS_450;
1953
+ const { default: __VLS_451 } = __VLS_nonNull(__VLS_447.slots);
1954
+ (__VLS_unwrap(t, {})('common.action.cancel'));
1955
+ // @ts-ignore
1956
+ [t,];
1957
+ var __VLS_447;
1958
+ var __VLS_448;
1959
+ if (step.value > 0) {
1960
+ let __VLS_452;
1961
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1962
+ elButton;
1963
+ // @ts-ignore
1964
+ const __VLS_453 = __VLS_asFunctionalComponent1(__VLS_452, new __VLS_452({
1965
+ // @ts-ignore
1966
+ ...{ 'onClick': {} },
1967
+ }));
1968
+ const __VLS_454 = __VLS_453({
1969
+ ...{ 'onClick': {} },
1970
+ }, ...__VLS_functionalComponentArgsRest(__VLS_453));
1971
+ let __VLS_457;
1972
+ const __VLS_458 = {
1973
+ /** @type {typeof __VLS_457.click} */
1974
+ onClick: // @ts-ignore
1975
+ (...[$event]) => {
1976
+ void $event;
1977
+ if (!(step.value > 0))
1978
+ throw 0;
1979
+ return (step.value--);
1980
+ // @ts-ignore
1981
+ [step, step,];
1982
+ },
1983
+ };
1984
+ void __VLS_458;
1985
+ const { default: __VLS_459 } = __VLS_nonNull(__VLS_455.slots);
1986
+ (__VLS_unwrap(t, {})('bi.source.model.action.previous'));
1987
+ // @ts-ignore
1988
+ [t,];
1989
+ var __VLS_455;
1990
+ var __VLS_456;
1991
+ }
1992
+ if (step.value < 2) {
1993
+ let __VLS_460;
1994
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
1995
+ elButton;
1996
+ // @ts-ignore
1997
+ const __VLS_461 = __VLS_asFunctionalComponent1(__VLS_460, new __VLS_460({
1998
+ // @ts-ignore
1999
+ ...{ 'onClick': {} }, type: "primary",
2000
+ }));
2001
+ const __VLS_462 = __VLS_461({
2002
+ ...{ 'onClick': {} },
2003
+ type: "primary",
2004
+ }, ...__VLS_functionalComponentArgsRest(__VLS_461));
2005
+ let __VLS_465;
2006
+ const __VLS_466 = {
2007
+ /** @type {typeof __VLS_465.click} */
2008
+ onClick: (nextStep),
2009
+ };
2010
+ void __VLS_466;
2011
+ const { default: __VLS_467 } = __VLS_nonNull(__VLS_463.slots);
2012
+ (__VLS_unwrap(t, {})('bi.source.model.action.next'));
2013
+ // @ts-ignore
2014
+ [t, step,];
2015
+ var __VLS_463;
2016
+ var __VLS_464;
2017
+ }
2018
+ else {
2019
+ let __VLS_468;
2020
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
2021
+ elButton;
2022
+ // @ts-ignore
2023
+ const __VLS_469 = __VLS_asFunctionalComponent1(__VLS_468, new __VLS_468({
2024
+ // @ts-ignore
2025
+ ...{ 'onClick': {} }, type: "primary", loading: (__VLS_unwrap(saving, {})),
2026
+ }));
2027
+ const __VLS_470 = __VLS_469({
2028
+ ...{ 'onClick': {} },
2029
+ type: "primary",
2030
+ loading: (__VLS_unwrap(saving, {})),
2031
+ }, ...__VLS_functionalComponentArgsRest(__VLS_469));
2032
+ let __VLS_473;
2033
+ const __VLS_474 = {
2034
+ /** @type {typeof __VLS_473.click} */
2035
+ onClick: (saveModel),
2036
+ };
2037
+ void __VLS_474;
2038
+ const { default: __VLS_475 } = __VLS_nonNull(__VLS_471.slots);
2039
+ (__VLS_unwrap(t, {})('bi.source.model.action.save'));
2040
+ // @ts-ignore
2041
+ [t, saving,];
2042
+ var __VLS_471;
2043
+ var __VLS_472;
2044
+ let __VLS_476;
2045
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
2046
+ elButton;
2047
+ // @ts-ignore
2048
+ const __VLS_477 = __VLS_asFunctionalComponent1(__VLS_476, new __VLS_476({
2049
+ // @ts-ignore
2050
+ ...{ 'onClick': {} }, icon: (__VLS_unwrap(DataAnalysis, {})), disabled: (!modelSaved.value), loading: (__VLS_unwrap(previewing, {})),
2051
+ }));
2052
+ const __VLS_478 = __VLS_477({
2053
+ ...{ 'onClick': {} },
2054
+ icon: (__VLS_unwrap(DataAnalysis, {})),
2055
+ disabled: (!modelSaved.value),
2056
+ loading: (__VLS_unwrap(previewing, {})),
2057
+ }, ...__VLS_functionalComponentArgsRest(__VLS_477));
2058
+ let __VLS_481;
2059
+ const __VLS_482 = {
2060
+ /** @type {typeof __VLS_481.click} */
2061
+ onClick: (previewModel),
2062
+ };
2063
+ void __VLS_482;
2064
+ const { default: __VLS_483 } = __VLS_nonNull(__VLS_479.slots);
2065
+ (__VLS_unwrap(t, {})('bi.source.model.action.preview'));
2066
+ // @ts-ignore
2067
+ [t, DataAnalysis, modelSaved, previewing,];
2068
+ var __VLS_479;
2069
+ var __VLS_480;
2070
+ if (modelSaved.value) {
2071
+ let __VLS_484;
2072
+ /** @ts-ignore @type { | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button'] | typeof __VLS_components.elButton | typeof __VLS_components.ElButton | typeof __VLS_components['el-button']} */
2073
+ elButton;
2074
+ // @ts-ignore
2075
+ const __VLS_485 = __VLS_asFunctionalComponent1(__VLS_484, new __VLS_484({
2076
+ // @ts-ignore
2077
+ ...{ 'onClick': {} },
2078
+ }));
2079
+ const __VLS_486 = __VLS_485({
2080
+ ...{ 'onClick': {} },
2081
+ }, ...__VLS_functionalComponentArgsRest(__VLS_485));
2082
+ let __VLS_489;
2083
+ const __VLS_490 = {
2084
+ /** @type {typeof __VLS_489.click} */
2085
+ onClick: // @ts-ignore
2086
+ (...[$event]) => {
2087
+ void $event;
2088
+ if (!!(step.value < 2))
2089
+ throw 0;
2090
+ if (!(modelSaved.value))
2091
+ throw 0;
2092
+ return (open.value = false);
2093
+ // @ts-ignore
2094
+ [open, modelSaved,];
2095
+ },
2096
+ };
2097
+ void __VLS_490;
2098
+ const { default: __VLS_491 } = __VLS_nonNull(__VLS_487.slots);
2099
+ (__VLS_unwrap(t, {})('bi.source.model.action.done'));
2100
+ // @ts-ignore
2101
+ [t,];
2102
+ var __VLS_487;
2103
+ var __VLS_488;
2104
+ }
2105
+ }
2106
+ // @ts-ignore
2107
+ [];
2108
+ }
2109
+ // @ts-ignore
2110
+ [];
2111
+ var __VLS_3;
2112
+ // @ts-ignore
2113
+ [];
2114
+ const __VLS_export = (await import('vue')).defineComponent({
2115
+ __typeEmits: {},
2116
+ __typeProps: {},
2117
+ });
2118
+ export default {};