@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,495 @@
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, reactive, ref, watch } from "vue";
4
+ import { t } from "@liujitcn/kratos-admin-core";
5
+ import FormDialog from "@liujitcn/kratos-admin-core/components/Dialog/FormDialog.vue";
6
+ import { defBiCardService } from "../api/bi/admin/v1/bi_card";
7
+ import { defBiQueryService } from "../api/bi/admin/v1/bi_query";
8
+ import BiDataCard from "./BiDataCard.vue";
9
+ import BiCardChartEditor from "./BiCardChartEditor.vue";
10
+ import { parseCardChart } from "../card-schema";
11
+ const { defineProps, defineEmits, } = {};
12
+ const props = defineProps();
13
+ const emit = defineEmits();
14
+ const dialogRef = ref();
15
+ const form = reactive(defaultForm());
16
+ const baseQuery = ref();
17
+ const previewResult = ref();
18
+ const sourceRecordID = ref(0);
19
+ const chartConfig = ref({ encoding: {}, style: { showLegend: true, showLabel: false } });
20
+ const saving = ref(false);
21
+ const previewing = ref(false);
22
+ let previewRequest = 0;
23
+ const source = computed(() => props.sources.find(item => item.code === form.source_code));
24
+ const query = computed(() => ({
25
+ source_code: form.source_code,
26
+ dimensions: [...form.dimensions],
27
+ measures: form.measures.map(item => ({ ...item })),
28
+ filters: baseQuery.value?.filters ?? [],
29
+ limit: baseQuery.value?.limit || 100,
30
+ time_range: baseQuery.value?.time_range,
31
+ orders: baseQuery.value?.orders ?? []
32
+ }));
33
+ const previewCard = computed(() => ({
34
+ id: 0,
35
+ tenant_id: 0,
36
+ project_id: 0,
37
+ owner_id: 0,
38
+ name: form.name,
39
+ source_code: form.source_code,
40
+ query: query.value,
41
+ chart_type: form.chart_type,
42
+ chart_json: JSON.stringify(chartConfig.value),
43
+ query_record_id: sourceRecordID.value,
44
+ refresh_seconds: form.refresh_seconds,
45
+ is_shared: form.is_shared,
46
+ updated_at: "",
47
+ category: "mine",
48
+ can_edit: true
49
+ }));
50
+ const fields = computed(() => [
51
+ { prop: "name", label: t("bi.card.name"), component: "input", colSpan: 12, props: { maxlength: 128 } },
52
+ {
53
+ prop: "source_code",
54
+ label: t("bi.card.source"),
55
+ component: "select",
56
+ colSpan: 12,
57
+ options: props.sources.map(item => ({ label: item.name, value: item.code })),
58
+ props: { disabled: true }
59
+ },
60
+ {
61
+ prop: "dimensions",
62
+ label: t("bi.card.dimensions"),
63
+ component: "select",
64
+ colSpan: 12,
65
+ options: (source.value?.dimensions ?? []).map(item => ({ label: item.name, value: item.code })),
66
+ props: {
67
+ multiple: true,
68
+ multipleLimit: 2,
69
+ disabled: true
70
+ }
71
+ },
72
+ { prop: "measures", label: t("bi.card.measure"), component: "slot", slotName: "measures", colSpan: 12 },
73
+ { prop: "chart", label: t("bi.card.chart_type"), component: "slot", slotName: "chart", colSpan: 12 },
74
+ { prop: "preview", label: t("bi.card.preview"), component: "slot", slotName: "preview", colSpan: 12 },
75
+ {
76
+ prop: "refresh_seconds",
77
+ label: t("bi.card.refresh"),
78
+ component: "select",
79
+ colSpan: 12,
80
+ options: [0, 300, 86400].map(value => ({ label: t(`bi.card.refresh.${value}`), value }))
81
+ },
82
+ { prop: "is_shared", label: t("bi.card.share"), component: "switch", colSpan: 12 }
83
+ ]);
84
+ const rules = computed(() => ({
85
+ name: [{ required: true, whitespace: true, message: t("bi.card.validation.name"), trigger: "blur" }],
86
+ source_code: [{ required: true, message: t("bi.card.validation.source"), trigger: "change" }],
87
+ measures: [{ type: "array", required: true, min: 1, message: t("bi.card.validation.measures"), trigger: "change" }]
88
+ }));
89
+ /** 创建独立表单状态,关闭后不保留上次卡片。 */
90
+ function defaultForm() {
91
+ return {
92
+ name: "",
93
+ source_code: "",
94
+ dimensions: [],
95
+ measures: [],
96
+ chart_type: "bar",
97
+ refresh_seconds: 0,
98
+ is_shared: false
99
+ };
100
+ }
101
+ /** 打开弹窗时复制原查询,保留问数生成的过滤、排序和时间范围。 */
102
+ watch(() => props.modelValue, visible => {
103
+ if (!visible)
104
+ return;
105
+ const current = props.card?.query ?? props.initialQuery;
106
+ baseQuery.value = current ? JSON.parse(JSON.stringify(current)) : undefined;
107
+ Object.assign(form, defaultForm(), {
108
+ name: props.card?.name ?? props.initialTitle ?? "",
109
+ source_code: current?.source_code || props.sources[0]?.code || "",
110
+ dimensions: [...(current?.dimensions ?? [])],
111
+ measures: (current?.measures ?? []).map(item => ({ ...item })),
112
+ chart_type: props.card?.chart_type || (current && !current.dimensions.length ? "metric" : props.initialChartType || "bar"),
113
+ refresh_seconds: props.card?.refresh_seconds ?? 0,
114
+ is_shared: props.card?.is_shared ?? false
115
+ });
116
+ previewResult.value = props.initialResult;
117
+ sourceRecordID.value = props.card?.query_record_id || props.initialResult?.query_record_id || 0;
118
+ chartConfig.value = parseCardChart(props.card ?? { chart_json: "" });
119
+ });
120
+ watch(query, () => {
121
+ previewRequest++;
122
+ previewResult.value = undefined;
123
+ sourceRecordID.value = 0;
124
+ chartConfig.value = { encoding: {}, style: { ...chartConfig.value.style } };
125
+ }, { deep: true, flush: "sync" });
126
+ /** 预览当前语义配置,忽略配置变化前的迟到响应。 */
127
+ async function preview() {
128
+ if (!(await dialogRef.value?.validate()) || previewing.value)
129
+ return;
130
+ if (!sourceRecordID.value) {
131
+ ElMessage.warning(t("bi.card.ask_required"));
132
+ return;
133
+ }
134
+ const request = ++previewRequest;
135
+ previewing.value = true;
136
+ try {
137
+ const result = await defBiQueryService.PreviewBiQuery({ query: query.value });
138
+ if (request === previewRequest) {
139
+ previewResult.value = result;
140
+ }
141
+ }
142
+ catch (cause) {
143
+ ElMessage.error(cause instanceof Error ? cause.message : t("bi.query.error"));
144
+ }
145
+ finally {
146
+ previewing.value = false;
147
+ }
148
+ }
149
+ /** 仅保存与原始智能问数关联的卡片,图表编辑不改变查询定义。 */
150
+ async function submit() {
151
+ if (!(await dialogRef.value?.validate()) || saving.value || previewing.value)
152
+ return;
153
+ if (!sourceRecordID.value) {
154
+ ElMessage.warning(t("bi.card.ask_required"));
155
+ return;
156
+ }
157
+ if (!previewResult.value)
158
+ await preview();
159
+ if (!previewResult.value || !sourceRecordID.value)
160
+ return;
161
+ saving.value = true;
162
+ try {
163
+ const saved = await defBiCardService.SaveBiCard({
164
+ id: props.card?.id ?? 0,
165
+ card: {
166
+ name: form.name,
167
+ query: query.value,
168
+ chart_type: form.chart_type,
169
+ chart_json: JSON.stringify(chartConfig.value),
170
+ query_record_id: sourceRecordID.value,
171
+ refresh_seconds: form.refresh_seconds,
172
+ is_shared: form.is_shared
173
+ }
174
+ });
175
+ emit("saved", saved);
176
+ emit("update:modelValue", false);
177
+ ElMessage.success(t("bi.card.saved"));
178
+ }
179
+ catch (cause) {
180
+ ElMessage.error(cause instanceof Error ? cause.message : t("bi.card.save_failed"));
181
+ }
182
+ finally {
183
+ saving.value = false;
184
+ }
185
+ }
186
+ /** 关闭弹窗后清空表单、预览与校验状态。 */
187
+ function reset() {
188
+ previewRequest++;
189
+ baseQuery.value = undefined;
190
+ Object.assign(form, defaultForm());
191
+ previewResult.value = undefined;
192
+ sourceRecordID.value = 0;
193
+ chartConfig.value = { encoding: {}, style: { showLegend: true, showLabel: false } };
194
+ dialogRef.value?.clearValidate();
195
+ }
196
+ const __VLS_ctx = {
197
+ ...{},
198
+ ...{},
199
+ ...{},
200
+ ...{},
201
+ };
202
+ let __VLS_components;
203
+ let __VLS_intrinsics;
204
+ let __VLS_directives;
205
+ void __VLS_ctx, __VLS_components, __VLS_intrinsics, __VLS_directives;
206
+ // @ts-ignore
207
+ __VLS_withDotValue(saving, {});
208
+ // @ts-ignore
209
+ __VLS_withDotValue(form, {});
210
+ // @ts-ignore
211
+ __VLS_withDotValue(source, {});
212
+ // @ts-ignore
213
+ __VLS_withDotValue(previewResult, {});
214
+ void {};
215
+ /** @type {__VLS_StyleScopedClasses['bi-card-measures__row']} */ ;
216
+ const __VLS_0 = FormDialog || FormDialog;
217
+ // @ts-ignore
218
+ const __VLS_1 = __VLS_asFunctionalComponent1(__VLS_0, new __VLS_0({
219
+ // @ts-ignore
220
+ ...{ 'onUpdate:modelValue': {} }, ...{ 'onConfirm': {} }, ...{ 'onClosed': {} }, ref: "dialogRef", modelValue: (__VLS_ctx.modelValue), title: (__VLS_ctx.card ? __VLS_unwrap(t, {})('bi.card.edit') : __VLS_unwrap(t, {})('bi.card.create')), width: "min(1040px, 94vw)", labelWidth: "7em", model: (form.value), fields: (__VLS_unwrap(fields, {})), rules: (__VLS_unwrap(rules, {})), confirmLoading: (saving.value), closeOnClickModal: (!saving.value), formProps: ({ disabled: saving.value }), destroyOnClose: (true),
221
+ }));
222
+ const __VLS_2 = __VLS_1({
223
+ ...{ 'onUpdate:modelValue': {} },
224
+ ...{ 'onConfirm': {} },
225
+ ...{ 'onClosed': {} },
226
+ ref: "dialogRef",
227
+ modelValue: (__VLS_ctx.modelValue),
228
+ title: (__VLS_ctx.card ? __VLS_unwrap(t, {})('bi.card.edit') : __VLS_unwrap(t, {})('bi.card.create')),
229
+ width: "min(1040px, 94vw)",
230
+ labelWidth: "7em",
231
+ model: (form.value),
232
+ fields: (__VLS_unwrap(fields, {})),
233
+ rules: (__VLS_unwrap(rules, {})),
234
+ confirmLoading: (saving.value),
235
+ closeOnClickModal: (!saving.value),
236
+ formProps: ({ disabled: saving.value }),
237
+ destroyOnClose: (true),
238
+ }, ...__VLS_functionalComponentArgsRest(__VLS_1));
239
+ let __VLS_5;
240
+ const __VLS_6 = {
241
+ /** @type {typeof __VLS_5.'update:modelValue'} */
242
+ 'onUpdate:modelValue': // @ts-ignore
243
+ (...[$event]) => {
244
+ void $event;
245
+ return (__VLS_unwrap(emit, {})('update:modelValue', $event));
246
+ // @ts-ignore
247
+ [modelValue, card, t, t, form, fields, rules, saving, saving, saving, emit,];
248
+ },
249
+ };
250
+ void __VLS_6;
251
+ const __VLS_7 = {
252
+ /** @type {typeof __VLS_5.confirm} */
253
+ onConfirm: (submit),
254
+ };
255
+ void __VLS_7;
256
+ const __VLS_8 = {
257
+ /** @type {typeof __VLS_5.closed} */
258
+ onClosed: (reset),
259
+ };
260
+ void __VLS_8;
261
+ const { default: __VLS_9 } = __VLS_nonNull(__VLS_3.slots);
262
+ {
263
+ const { measures: __VLS_10 } = __VLS_nonNull(__VLS_3.slots);
264
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
265
+ ...{ class: "bi-card-measures" },
266
+ });
267
+ /** @type {__VLS_StyleScopedClasses['bi-card-measures']} */ ;
268
+ const __VLS_11 = __VLS_tryAsConstant((form.value.measures));
269
+ for (const [measure, index] of __VLS_vFor(__VLS_nonNull(__VLS_11))) {
270
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
271
+ key: (index),
272
+ ...{ class: "bi-card-measures__row" },
273
+ });
274
+ /** @type {__VLS_StyleScopedClasses['bi-card-measures__row']} */ ;
275
+ let __VLS_12;
276
+ /** @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']} */
277
+ elSelect;
278
+ // @ts-ignore
279
+ const __VLS_13 = __VLS_asFunctionalComponent1(__VLS_12, new __VLS_12({
280
+ // @ts-ignore
281
+ disabled: true, modelValue: (measure.code), 'aria-label': (__VLS_unwrap(t, {})('bi.card.measure')),
282
+ }));
283
+ const __VLS_14 = __VLS_13({
284
+ disabled: true,
285
+ modelValue: (measure.code),
286
+ 'aria-label': (__VLS_unwrap(t, {})('bi.card.measure')),
287
+ }, ...__VLS_functionalComponentArgsRest(__VLS_13));
288
+ const { default: __VLS_17 } = __VLS_nonNull(__VLS_15.slots);
289
+ const __VLS_18 = __VLS_tryAsConstant((source.value?.measures ?? []));
290
+ for (const [item] of __VLS_vFor(__VLS_nonNull(__VLS_18))) {
291
+ let __VLS_19;
292
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
293
+ elOption;
294
+ // @ts-ignore
295
+ const __VLS_20 = __VLS_asFunctionalComponent1(__VLS_19, new __VLS_19({
296
+ // @ts-ignore
297
+ key: (item.code), label: (item.name), value: (item.code),
298
+ }));
299
+ const __VLS_21 = __VLS_20({
300
+ key: (item.code),
301
+ label: (item.name),
302
+ value: (item.code),
303
+ }, ...__VLS_functionalComponentArgsRest(__VLS_20));
304
+ // @ts-ignore
305
+ [t, form, source,];
306
+ }
307
+ // @ts-ignore
308
+ [];
309
+ var __VLS_15;
310
+ let __VLS_24;
311
+ /** @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']} */
312
+ elSelect;
313
+ // @ts-ignore
314
+ const __VLS_25 = __VLS_asFunctionalComponent1(__VLS_24, new __VLS_24({
315
+ // @ts-ignore
316
+ disabled: true, modelValue: (measure.aggregation), 'aria-label': (__VLS_unwrap(t, {})('bi.card.aggregation')),
317
+ }));
318
+ const __VLS_26 = __VLS_25({
319
+ disabled: true,
320
+ modelValue: (measure.aggregation),
321
+ 'aria-label': (__VLS_unwrap(t, {})('bi.card.aggregation')),
322
+ }, ...__VLS_functionalComponentArgsRest(__VLS_25));
323
+ const { default: __VLS_29 } = __VLS_nonNull(__VLS_27.slots);
324
+ const __VLS_30 = __VLS_tryAsConstant((source.value?.measures.find(item => item.code === measure.code)?.aggregations ?? []));
325
+ for (const [aggregation] of __VLS_vFor(__VLS_nonNull(__VLS_30))) {
326
+ let __VLS_31;
327
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
328
+ elOption;
329
+ // @ts-ignore
330
+ const __VLS_32 = __VLS_asFunctionalComponent1(__VLS_31, new __VLS_31({
331
+ // @ts-ignore
332
+ key: (aggregation), label: (__VLS_unwrap(t, {})(`bi.card.aggregation.${aggregation}`)), value: (aggregation),
333
+ }));
334
+ const __VLS_33 = __VLS_32({
335
+ key: (aggregation),
336
+ label: (__VLS_unwrap(t, {})(`bi.card.aggregation.${aggregation}`)),
337
+ value: (aggregation),
338
+ }, ...__VLS_functionalComponentArgsRest(__VLS_32));
339
+ // @ts-ignore
340
+ [t, t, source,];
341
+ }
342
+ // @ts-ignore
343
+ [];
344
+ var __VLS_27;
345
+ // @ts-ignore
346
+ [];
347
+ }
348
+ // @ts-ignore
349
+ [];
350
+ }
351
+ {
352
+ const { chart: __VLS_36 } = __VLS_nonNull(__VLS_3.slots);
353
+ const __VLS_37 = BiCardChartEditor;
354
+ // @ts-ignore
355
+ const __VLS_38 = __VLS_asFunctionalComponent1(__VLS_37, new __VLS_37({
356
+ // @ts-ignore
357
+ modelValue: (__VLS_unwrap(chartConfig, {})), chartType: (form.value.chart_type), query: (__VLS_unwrap(query, {})), result: (previewResult.value),
358
+ }));
359
+ const __VLS_39 = __VLS_38({
360
+ modelValue: (__VLS_unwrap(chartConfig, {})),
361
+ chartType: (form.value.chart_type),
362
+ query: (__VLS_unwrap(query, {})),
363
+ result: (previewResult.value),
364
+ }, ...__VLS_functionalComponentArgsRest(__VLS_38));
365
+ // @ts-ignore
366
+ [form, chartConfig, query, previewResult,];
367
+ }
368
+ {
369
+ const { preview: __VLS_42 } = __VLS_nonNull(__VLS_3.slots);
370
+ if (previewResult.value) {
371
+ const __VLS_43 = BiDataCard;
372
+ // @ts-ignore
373
+ const __VLS_44 = __VLS_asFunctionalComponent1(__VLS_43, new __VLS_43({
374
+ // @ts-ignore
375
+ card: (__VLS_unwrap(previewCard, {})), previewResult: (previewResult.value), sourceName: (source.value?.name),
376
+ }));
377
+ const __VLS_45 = __VLS_44({
378
+ card: (__VLS_unwrap(previewCard, {})),
379
+ previewResult: (previewResult.value),
380
+ sourceName: (source.value?.name),
381
+ }, ...__VLS_functionalComponentArgsRest(__VLS_44));
382
+ }
383
+ else {
384
+ let __VLS_48;
385
+ /** @ts-ignore @type { | typeof __VLS_components.elEmpty | typeof __VLS_components.ElEmpty | typeof __VLS_components['el-empty']} */
386
+ elEmpty;
387
+ // @ts-ignore
388
+ const __VLS_49 = __VLS_asFunctionalComponent1(__VLS_48, new __VLS_48({
389
+ // @ts-ignore
390
+ imageSize: (36), description: (__VLS_unwrap(t, {})('bi.card.preview_empty')),
391
+ }));
392
+ const __VLS_50 = __VLS_49({
393
+ imageSize: (36),
394
+ description: (__VLS_unwrap(t, {})('bi.card.preview_empty')),
395
+ }, ...__VLS_functionalComponentArgsRest(__VLS_49));
396
+ }
397
+ // @ts-ignore
398
+ [t, source, previewResult, previewResult, previewCard,];
399
+ }
400
+ {
401
+ const { footer: __VLS_53 } = __VLS_nonNull(__VLS_3.slots);
402
+ let __VLS_54;
403
+ /** @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']} */
404
+ elButton;
405
+ // @ts-ignore
406
+ const __VLS_55 = __VLS_asFunctionalComponent1(__VLS_54, new __VLS_54({
407
+ // @ts-ignore
408
+ ...{ 'onClick': {} }, disabled: (saving.value),
409
+ }));
410
+ const __VLS_56 = __VLS_55({
411
+ ...{ 'onClick': {} },
412
+ disabled: (saving.value),
413
+ }, ...__VLS_functionalComponentArgsRest(__VLS_55));
414
+ let __VLS_59;
415
+ const __VLS_60 = {
416
+ /** @type {typeof __VLS_59.click} */
417
+ onClick: // @ts-ignore
418
+ (...[$event]) => {
419
+ void $event;
420
+ return (__VLS_unwrap(emit, {})('update:modelValue', false));
421
+ // @ts-ignore
422
+ [saving, emit,];
423
+ },
424
+ };
425
+ void __VLS_60;
426
+ const { default: __VLS_61 } = __VLS_nonNull(__VLS_57.slots);
427
+ (__VLS_unwrap(t, {})("common.action.cancel"));
428
+ // @ts-ignore
429
+ [t,];
430
+ var __VLS_57;
431
+ var __VLS_58;
432
+ let __VLS_62;
433
+ /** @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']} */
434
+ elButton;
435
+ // @ts-ignore
436
+ const __VLS_63 = __VLS_asFunctionalComponent1(__VLS_62, new __VLS_62({
437
+ // @ts-ignore
438
+ ...{ 'onClick': {} }, loading: (__VLS_unwrap(previewing, {})), disabled: (saving.value),
439
+ }));
440
+ const __VLS_64 = __VLS_63({
441
+ ...{ 'onClick': {} },
442
+ loading: (__VLS_unwrap(previewing, {})),
443
+ disabled: (saving.value),
444
+ }, ...__VLS_functionalComponentArgsRest(__VLS_63));
445
+ let __VLS_67;
446
+ const __VLS_68 = {
447
+ /** @type {typeof __VLS_67.click} */
448
+ onClick: (preview),
449
+ };
450
+ void __VLS_68;
451
+ const { default: __VLS_69 } = __VLS_nonNull(__VLS_65.slots);
452
+ (__VLS_unwrap(t, {})("bi.card.preview"));
453
+ // @ts-ignore
454
+ [t, saving, previewing,];
455
+ var __VLS_65;
456
+ var __VLS_66;
457
+ let __VLS_70;
458
+ /** @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']} */
459
+ elButton;
460
+ // @ts-ignore
461
+ const __VLS_71 = __VLS_asFunctionalComponent1(__VLS_70, new __VLS_70({
462
+ // @ts-ignore
463
+ ...{ 'onClick': {} }, type: "primary", loading: (saving.value),
464
+ }));
465
+ const __VLS_72 = __VLS_71({
466
+ ...{ 'onClick': {} },
467
+ type: "primary",
468
+ loading: (saving.value),
469
+ }, ...__VLS_functionalComponentArgsRest(__VLS_71));
470
+ let __VLS_75;
471
+ const __VLS_76 = {
472
+ /** @type {typeof __VLS_75.click} */
473
+ onClick: (submit),
474
+ };
475
+ void __VLS_76;
476
+ const { default: __VLS_77 } = __VLS_nonNull(__VLS_73.slots);
477
+ (__VLS_unwrap(t, {})("bi.card.save"));
478
+ // @ts-ignore
479
+ [t, saving,];
480
+ var __VLS_73;
481
+ var __VLS_74;
482
+ // @ts-ignore
483
+ [];
484
+ }
485
+ // @ts-ignore
486
+ [];
487
+ var __VLS_3;
488
+ var __VLS_4;
489
+ // @ts-ignore
490
+ [];
491
+ const __VLS_export = (await import('vue')).defineComponent({
492
+ __typeEmits: {},
493
+ __typeProps: {},
494
+ });
495
+ export default {};
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;