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

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,17 @@
1
+ import type { BiQueryResult, BiQuerySpec } from "../rpc/bi/admin/v1/bi_query";
2
+ import type { CardChartConfig } from "../card-schema";
3
+ type __VLS_Props = {
4
+ modelValue: CardChartConfig;
5
+ chartType: string;
6
+ query: BiQuerySpec;
7
+ result?: BiQueryResult;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: CardChartConfig) => any;
11
+ "update:chartType": (value: string) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: CardChartConfig) => any) | undefined;
14
+ "onUpdate:chartType"?: ((value: string) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,527 @@
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 } from "vue";
4
+ import { t } from "@liujitcn/kratos-admin-core";
5
+ import { getChartTypes } from "../engine/chart-types";
6
+ import { useBiI18n } from "../env";
7
+ const { defineProps, defineEmits, } = {};
8
+ const props = defineProps();
9
+ const emit = defineEmits();
10
+ const { t: messages } = useBiI18n();
11
+ const types = [...getChartTypes(), "metric"];
12
+ const numbers = computed(() => props.result?.columns.filter(field => field.type === "number") ??
13
+ props.query.measures.map(field => ({ code: field.code, name: field.code, type: "number" })));
14
+ const categories = computed(() => props.query.dimensions.map(code => props.result?.columns.find(field => field.code === code) ?? { code, name: code, type: "string" }));
15
+ const dimensionFields = computed(() => (props.chartType === "scatter" ? numbers.value : categories.value));
16
+ /** 根据真实结果结构启用图型,避免产生不能渲染的卡片。 */
17
+ function reason(type) {
18
+ if (["metric", "gauge"].includes(type))
19
+ return props.query.dimensions.length ? t("bi.card.need_ungrouped") : "";
20
+ if (type === "scatter")
21
+ return numbers.value.length < 2 ? t("bi.card.need_two_numbers") : "";
22
+ if (["sankey", "heatmap", "sunburst"].includes(type))
23
+ return categories.value.length < 2 ? t("bi.card.need_two_dimensions") : "";
24
+ return categories.value.length ? "" : t("bi.card.need_dimension");
25
+ }
26
+ /** 切换图型时复用当前查询结果,并补齐该图型的默认字段映射。 */
27
+ function changeType(type) {
28
+ emit("update:chartType", type);
29
+ emit("update:modelValue", {
30
+ encoding: {
31
+ dimension: type === "scatter" ? numbers.value[0]?.code : categories.value[0]?.code,
32
+ measure: type === "scatter" ? numbers.value[1]?.code : numbers.value[0]?.code,
33
+ series: type === "scatter" ? undefined : categories.value[1]?.code,
34
+ measures: ["bar", "line", "area"].includes(type) && categories.value.length < 2 ? numbers.value.map(field => field.code) : undefined
35
+ },
36
+ style: { ...props.modelValue.style }
37
+ });
38
+ }
39
+ /** 同步字段映射,不重新执行已完成的查询。 */
40
+ function patchEncoding(value) {
41
+ emit("update:modelValue", { ...props.modelValue, encoding: { ...props.modelValue.encoding, ...value } });
42
+ }
43
+ /** 同步受控样式选项。 */
44
+ function patchStyle(value) {
45
+ emit("update:modelValue", { ...props.modelValue, style: { ...props.modelValue.style, ...value } });
46
+ }
47
+ const __VLS_ctx = {
48
+ ...{},
49
+ ...{},
50
+ ...{},
51
+ ...{},
52
+ };
53
+ let __VLS_components;
54
+ let __VLS_intrinsics;
55
+ let __VLS_directives;
56
+ void __VLS_ctx, __VLS_components, __VLS_intrinsics, __VLS_directives;
57
+ // @ts-ignore
58
+ __VLS_withDotValue(dimensionFields, {});
59
+ // @ts-ignore
60
+ __VLS_withDotValue(numbers, {});
61
+ // @ts-ignore
62
+ __VLS_withDotValue(categories, {});
63
+ void {};
64
+ /** @type {__VLS_StyleScopedClasses['bi-card-chart-editor__types']} */ ;
65
+ /** @type {__VLS_StyleScopedClasses['bi-card-chart-editor__types']} */ ;
66
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
67
+ ...{ class: "bi-card-chart-editor" },
68
+ });
69
+ /** @type {__VLS_StyleScopedClasses['bi-card-chart-editor']} */ ;
70
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
71
+ ...{ class: "bi-card-chart-editor__types" },
72
+ });
73
+ /** @type {__VLS_StyleScopedClasses['bi-card-chart-editor__types']} */ ;
74
+ const __VLS_0 = __VLS_tryAsConstant((__VLS_unwrap(types, {})));
75
+ for (const [type] of __VLS_vFor(__VLS_nonNull(__VLS_0))) {
76
+ let __VLS_1;
77
+ /** @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']} */
78
+ elButton;
79
+ // @ts-ignore
80
+ const __VLS_2 = __VLS_asFunctionalComponent1(__VLS_1, new __VLS_1({
81
+ // @ts-ignore
82
+ ...{ 'onClick': {} }, key: (type), type: (type === __VLS_ctx.chartType ? 'primary' : 'default'), plain: (type !== __VLS_ctx.chartType), disabled: (Boolean(reason(type))), title: (reason(type)),
83
+ }));
84
+ const __VLS_3 = __VLS_2({
85
+ ...{ 'onClick': {} },
86
+ key: (type),
87
+ type: (type === __VLS_ctx.chartType ? 'primary' : 'default'),
88
+ plain: (type !== __VLS_ctx.chartType),
89
+ disabled: (Boolean(reason(type))),
90
+ title: (reason(type)),
91
+ }, ...__VLS_functionalComponentArgsRest(__VLS_2));
92
+ let __VLS_6;
93
+ const __VLS_7 = {
94
+ /** @type {typeof __VLS_6.click} */
95
+ onClick: // @ts-ignore
96
+ (...[$event]) => {
97
+ void $event;
98
+ return (changeType(type));
99
+ // @ts-ignore
100
+ [types, chartType, chartType,];
101
+ },
102
+ };
103
+ void __VLS_7;
104
+ const { default: __VLS_8 } = __VLS_nonNull(__VLS_4.slots);
105
+ (type === "metric" ? __VLS_unwrap(t, {})("bi.card.chart.metric") : __VLS_unwrap(messages, {})(`types.${type}`));
106
+ // @ts-ignore
107
+ [t, messages,];
108
+ var __VLS_4;
109
+ var __VLS_5;
110
+ // @ts-ignore
111
+ [];
112
+ }
113
+ __VLS_asFunctionalElement1(__VLS_intrinsics.p, __VLS_intrinsics.p)({
114
+ ...{ class: "bi-card-chart-editor__hint" },
115
+ });
116
+ /** @type {__VLS_StyleScopedClasses['bi-card-chart-editor__hint']} */ ;
117
+ (__VLS_unwrap(t, {})("bi.card.chart_hint"));
118
+ let __VLS_9;
119
+ /** @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']} */
120
+ elForm;
121
+ // @ts-ignore
122
+ const __VLS_10 = __VLS_asFunctionalComponent1(__VLS_9, new __VLS_9({
123
+ // @ts-ignore
124
+ labelPosition: "top",
125
+ }));
126
+ const __VLS_11 = __VLS_10({
127
+ labelPosition: "top",
128
+ }, ...__VLS_functionalComponentArgsRest(__VLS_10));
129
+ const { default: __VLS_14 } = __VLS_nonNull(__VLS_12.slots);
130
+ if (__VLS_ctx.chartType !== 'metric' && __VLS_ctx.chartType !== 'gauge') {
131
+ let __VLS_15;
132
+ /** @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']} */
133
+ elFormItem;
134
+ // @ts-ignore
135
+ const __VLS_16 = __VLS_asFunctionalComponent1(__VLS_15, new __VLS_15({
136
+ // @ts-ignore
137
+ label: (__VLS_unwrap(t, {})('bi.card.dimension_field')),
138
+ }));
139
+ const __VLS_17 = __VLS_16({
140
+ label: (__VLS_unwrap(t, {})('bi.card.dimension_field')),
141
+ }, ...__VLS_functionalComponentArgsRest(__VLS_16));
142
+ const { default: __VLS_20 } = __VLS_nonNull(__VLS_18.slots);
143
+ let __VLS_21;
144
+ /** @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']} */
145
+ elSelect;
146
+ // @ts-ignore
147
+ const __VLS_22 = __VLS_asFunctionalComponent1(__VLS_21, new __VLS_21({
148
+ // @ts-ignore
149
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.encoding.dimension || dimensionFields.value[0]?.code),
150
+ }));
151
+ const __VLS_23 = __VLS_22({
152
+ ...{ 'onChange': {} },
153
+ modelValue: (__VLS_ctx.modelValue.encoding.dimension || dimensionFields.value[0]?.code),
154
+ }, ...__VLS_functionalComponentArgsRest(__VLS_22));
155
+ let __VLS_26;
156
+ const __VLS_27 = {
157
+ /** @type {typeof __VLS_26.change} */
158
+ onChange: // @ts-ignore
159
+ (...[$event]) => {
160
+ void $event;
161
+ if (!(__VLS_ctx.chartType !== 'metric' && __VLS_ctx.chartType !== 'gauge'))
162
+ throw 0;
163
+ return (patchEncoding({ dimension: $event }));
164
+ // @ts-ignore
165
+ [chartType, chartType, t, t, modelValue, dimensionFields,];
166
+ },
167
+ };
168
+ void __VLS_27;
169
+ const { default: __VLS_28 } = __VLS_nonNull(__VLS_24.slots);
170
+ const __VLS_29 = __VLS_tryAsConstant((dimensionFields.value));
171
+ for (const [field] of __VLS_vFor(__VLS_nonNull(__VLS_29))) {
172
+ let __VLS_30;
173
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
174
+ elOption;
175
+ // @ts-ignore
176
+ const __VLS_31 = __VLS_asFunctionalComponent1(__VLS_30, new __VLS_30({
177
+ // @ts-ignore
178
+ key: (field.code), value: (field.code), label: (field.name),
179
+ }));
180
+ const __VLS_32 = __VLS_31({
181
+ key: (field.code),
182
+ value: (field.code),
183
+ label: (field.name),
184
+ }, ...__VLS_functionalComponentArgsRest(__VLS_31));
185
+ // @ts-ignore
186
+ [dimensionFields,];
187
+ }
188
+ // @ts-ignore
189
+ [];
190
+ var __VLS_24;
191
+ var __VLS_25;
192
+ // @ts-ignore
193
+ [];
194
+ var __VLS_18;
195
+ }
196
+ let __VLS_35;
197
+ /** @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']} */
198
+ elFormItem;
199
+ // @ts-ignore
200
+ const __VLS_36 = __VLS_asFunctionalComponent1(__VLS_35, new __VLS_35({
201
+ // @ts-ignore
202
+ label: (__VLS_unwrap(t, {})('bi.card.value_field')),
203
+ }));
204
+ const __VLS_37 = __VLS_36({
205
+ label: (__VLS_unwrap(t, {})('bi.card.value_field')),
206
+ }, ...__VLS_functionalComponentArgsRest(__VLS_36));
207
+ const { default: __VLS_40 } = __VLS_nonNull(__VLS_38.slots);
208
+ let __VLS_41;
209
+ /** @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']} */
210
+ elSelect;
211
+ // @ts-ignore
212
+ const __VLS_42 = __VLS_asFunctionalComponent1(__VLS_41, new __VLS_41({
213
+ // @ts-ignore
214
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.encoding.measure || numbers.value[__VLS_ctx.chartType === 'scatter' ? 1 : 0]?.code),
215
+ }));
216
+ const __VLS_43 = __VLS_42({
217
+ ...{ 'onChange': {} },
218
+ modelValue: (__VLS_ctx.modelValue.encoding.measure || numbers.value[__VLS_ctx.chartType === 'scatter' ? 1 : 0]?.code),
219
+ }, ...__VLS_functionalComponentArgsRest(__VLS_42));
220
+ let __VLS_46;
221
+ const __VLS_47 = {
222
+ /** @type {typeof __VLS_46.change} */
223
+ onChange: // @ts-ignore
224
+ (...[$event]) => {
225
+ void $event;
226
+ return (patchEncoding({ measure: $event }));
227
+ // @ts-ignore
228
+ [chartType, t, modelValue, numbers,];
229
+ },
230
+ };
231
+ void __VLS_47;
232
+ const { default: __VLS_48 } = __VLS_nonNull(__VLS_44.slots);
233
+ const __VLS_49 = __VLS_tryAsConstant((numbers.value));
234
+ for (const [field] of __VLS_vFor(__VLS_nonNull(__VLS_49))) {
235
+ let __VLS_50;
236
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
237
+ elOption;
238
+ // @ts-ignore
239
+ const __VLS_51 = __VLS_asFunctionalComponent1(__VLS_50, new __VLS_50({
240
+ // @ts-ignore
241
+ key: (field.code), value: (field.code), label: (field.name),
242
+ }));
243
+ const __VLS_52 = __VLS_51({
244
+ key: (field.code),
245
+ value: (field.code),
246
+ label: (field.name),
247
+ }, ...__VLS_functionalComponentArgsRest(__VLS_51));
248
+ // @ts-ignore
249
+ [numbers,];
250
+ }
251
+ // @ts-ignore
252
+ [];
253
+ var __VLS_44;
254
+ var __VLS_45;
255
+ // @ts-ignore
256
+ [];
257
+ var __VLS_38;
258
+ if (['sankey', 'heatmap', 'sunburst'].includes(__VLS_ctx.chartType)) {
259
+ let __VLS_55;
260
+ /** @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']} */
261
+ elFormItem;
262
+ // @ts-ignore
263
+ const __VLS_56 = __VLS_asFunctionalComponent1(__VLS_55, new __VLS_55({
264
+ // @ts-ignore
265
+ label: (__VLS_unwrap(t, {})('bi.card.series_field')),
266
+ }));
267
+ const __VLS_57 = __VLS_56({
268
+ label: (__VLS_unwrap(t, {})('bi.card.series_field')),
269
+ }, ...__VLS_functionalComponentArgsRest(__VLS_56));
270
+ const { default: __VLS_60 } = __VLS_nonNull(__VLS_58.slots);
271
+ let __VLS_61;
272
+ /** @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']} */
273
+ elSelect;
274
+ // @ts-ignore
275
+ const __VLS_62 = __VLS_asFunctionalComponent1(__VLS_61, new __VLS_61({
276
+ // @ts-ignore
277
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.encoding.series || categories.value[1]?.code),
278
+ }));
279
+ const __VLS_63 = __VLS_62({
280
+ ...{ 'onChange': {} },
281
+ modelValue: (__VLS_ctx.modelValue.encoding.series || categories.value[1]?.code),
282
+ }, ...__VLS_functionalComponentArgsRest(__VLS_62));
283
+ let __VLS_66;
284
+ const __VLS_67 = {
285
+ /** @type {typeof __VLS_66.change} */
286
+ onChange: // @ts-ignore
287
+ (...[$event]) => {
288
+ void $event;
289
+ if (!(['sankey', 'heatmap', 'sunburst'].includes(__VLS_ctx.chartType)))
290
+ throw 0;
291
+ return (patchEncoding({ series: $event }));
292
+ // @ts-ignore
293
+ [chartType, t, modelValue, categories,];
294
+ },
295
+ };
296
+ void __VLS_67;
297
+ const { default: __VLS_68 } = __VLS_nonNull(__VLS_64.slots);
298
+ const __VLS_69 = __VLS_tryAsConstant((categories.value));
299
+ for (const [field] of __VLS_vFor(__VLS_nonNull(__VLS_69))) {
300
+ let __VLS_70;
301
+ /** @ts-ignore @type { | typeof __VLS_components.elOption | typeof __VLS_components.ElOption | typeof __VLS_components['el-option']} */
302
+ elOption;
303
+ // @ts-ignore
304
+ const __VLS_71 = __VLS_asFunctionalComponent1(__VLS_70, new __VLS_70({
305
+ // @ts-ignore
306
+ key: (field.code), value: (field.code), label: (field.name),
307
+ }));
308
+ const __VLS_72 = __VLS_71({
309
+ key: (field.code),
310
+ value: (field.code),
311
+ label: (field.name),
312
+ }, ...__VLS_functionalComponentArgsRest(__VLS_71));
313
+ // @ts-ignore
314
+ [categories,];
315
+ }
316
+ // @ts-ignore
317
+ [];
318
+ var __VLS_64;
319
+ var __VLS_65;
320
+ // @ts-ignore
321
+ [];
322
+ var __VLS_58;
323
+ }
324
+ if (['bar', 'line', 'area'].includes(__VLS_ctx.chartType)) {
325
+ let __VLS_75;
326
+ /** @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']} */
327
+ elFormItem;
328
+ // @ts-ignore
329
+ const __VLS_76 = __VLS_asFunctionalComponent1(__VLS_75, new __VLS_75({
330
+ // @ts-ignore
331
+ label: (__VLS_unwrap(t, {})('bi.card.measure')),
332
+ }));
333
+ const __VLS_77 = __VLS_76({
334
+ label: (__VLS_unwrap(t, {})('bi.card.measure')),
335
+ }, ...__VLS_functionalComponentArgsRest(__VLS_76));
336
+ const { default: __VLS_80 } = __VLS_nonNull(__VLS_78.slots);
337
+ let __VLS_81;
338
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckboxGroup | typeof __VLS_components.ElCheckboxGroup | typeof __VLS_components['el-checkbox-group'] | typeof __VLS_components.elCheckboxGroup | typeof __VLS_components.ElCheckboxGroup | typeof __VLS_components['el-checkbox-group']} */
339
+ elCheckboxGroup;
340
+ // @ts-ignore
341
+ const __VLS_82 = __VLS_asFunctionalComponent1(__VLS_81, new __VLS_81({
342
+ // @ts-ignore
343
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.encoding.measures || []),
344
+ }));
345
+ const __VLS_83 = __VLS_82({
346
+ ...{ 'onChange': {} },
347
+ modelValue: (__VLS_ctx.modelValue.encoding.measures || []),
348
+ }, ...__VLS_functionalComponentArgsRest(__VLS_82));
349
+ let __VLS_86;
350
+ const __VLS_87 = {
351
+ /** @type {typeof __VLS_86.change} */
352
+ onChange: // @ts-ignore
353
+ (...[$event]) => {
354
+ void $event;
355
+ if (!(['bar', 'line', 'area'].includes(__VLS_ctx.chartType)))
356
+ throw 0;
357
+ return (patchEncoding({ measures: $event }));
358
+ // @ts-ignore
359
+ [chartType, t, modelValue,];
360
+ },
361
+ };
362
+ void __VLS_87;
363
+ const { default: __VLS_88 } = __VLS_nonNull(__VLS_84.slots);
364
+ const __VLS_89 = __VLS_tryAsConstant((numbers.value));
365
+ for (const [field] of __VLS_vFor(__VLS_nonNull(__VLS_89))) {
366
+ let __VLS_90;
367
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox'] | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox']} */
368
+ elCheckbox;
369
+ // @ts-ignore
370
+ const __VLS_91 = __VLS_asFunctionalComponent1(__VLS_90, new __VLS_90({
371
+ // @ts-ignore
372
+ key: (field.code), value: (field.code),
373
+ }));
374
+ const __VLS_92 = __VLS_91({
375
+ key: (field.code),
376
+ value: (field.code),
377
+ }, ...__VLS_functionalComponentArgsRest(__VLS_91));
378
+ const { default: __VLS_95 } = __VLS_nonNull(__VLS_93.slots);
379
+ (field.name);
380
+ // @ts-ignore
381
+ [numbers,];
382
+ var __VLS_93;
383
+ // @ts-ignore
384
+ [];
385
+ }
386
+ // @ts-ignore
387
+ [];
388
+ var __VLS_84;
389
+ var __VLS_85;
390
+ // @ts-ignore
391
+ [];
392
+ var __VLS_78;
393
+ }
394
+ __VLS_asFunctionalElement1(__VLS_intrinsics.div, __VLS_intrinsics.div)({
395
+ ...{ class: "bi-card-chart-editor__style" },
396
+ });
397
+ /** @type {__VLS_StyleScopedClasses['bi-card-chart-editor__style']} */ ;
398
+ let __VLS_96;
399
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox'] | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox']} */
400
+ elCheckbox;
401
+ // @ts-ignore
402
+ const __VLS_97 = __VLS_asFunctionalComponent1(__VLS_96, new __VLS_96({
403
+ // @ts-ignore
404
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.style.showLegend),
405
+ }));
406
+ const __VLS_98 = __VLS_97({
407
+ ...{ 'onChange': {} },
408
+ modelValue: (__VLS_ctx.modelValue.style.showLegend),
409
+ }, ...__VLS_functionalComponentArgsRest(__VLS_97));
410
+ let __VLS_101;
411
+ const __VLS_102 = {
412
+ /** @type {typeof __VLS_101.change} */
413
+ onChange: // @ts-ignore
414
+ (...[$event]) => {
415
+ void $event;
416
+ return (patchStyle({ showLegend: Boolean($event) }));
417
+ // @ts-ignore
418
+ [modelValue,];
419
+ },
420
+ };
421
+ void __VLS_102;
422
+ const { default: __VLS_103 } = __VLS_nonNull(__VLS_99.slots);
423
+ (__VLS_unwrap(t, {})("bi.card.show_legend"));
424
+ // @ts-ignore
425
+ [t,];
426
+ var __VLS_99;
427
+ var __VLS_100;
428
+ let __VLS_104;
429
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox'] | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox']} */
430
+ elCheckbox;
431
+ // @ts-ignore
432
+ const __VLS_105 = __VLS_asFunctionalComponent1(__VLS_104, new __VLS_104({
433
+ // @ts-ignore
434
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.style.showLabel),
435
+ }));
436
+ const __VLS_106 = __VLS_105({
437
+ ...{ 'onChange': {} },
438
+ modelValue: (__VLS_ctx.modelValue.style.showLabel),
439
+ }, ...__VLS_functionalComponentArgsRest(__VLS_105));
440
+ let __VLS_109;
441
+ const __VLS_110 = {
442
+ /** @type {typeof __VLS_109.change} */
443
+ onChange: // @ts-ignore
444
+ (...[$event]) => {
445
+ void $event;
446
+ return (patchStyle({ showLabel: Boolean($event) }));
447
+ // @ts-ignore
448
+ [modelValue,];
449
+ },
450
+ };
451
+ void __VLS_110;
452
+ const { default: __VLS_111 } = __VLS_nonNull(__VLS_107.slots);
453
+ (__VLS_unwrap(t, {})("bi.card.show_label"));
454
+ // @ts-ignore
455
+ [t,];
456
+ var __VLS_107;
457
+ var __VLS_108;
458
+ let __VLS_112;
459
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox'] | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox']} */
460
+ elCheckbox;
461
+ // @ts-ignore
462
+ const __VLS_113 = __VLS_asFunctionalComponent1(__VLS_112, new __VLS_112({
463
+ // @ts-ignore
464
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.style.stack),
465
+ }));
466
+ const __VLS_114 = __VLS_113({
467
+ ...{ 'onChange': {} },
468
+ modelValue: (__VLS_ctx.modelValue.style.stack),
469
+ }, ...__VLS_functionalComponentArgsRest(__VLS_113));
470
+ let __VLS_117;
471
+ const __VLS_118 = {
472
+ /** @type {typeof __VLS_117.change} */
473
+ onChange: // @ts-ignore
474
+ (...[$event]) => {
475
+ void $event;
476
+ return (patchStyle({ stack: Boolean($event) }));
477
+ // @ts-ignore
478
+ [modelValue,];
479
+ },
480
+ };
481
+ void __VLS_118;
482
+ const { default: __VLS_119 } = __VLS_nonNull(__VLS_115.slots);
483
+ (__VLS_unwrap(t, {})("bi.card.stack"));
484
+ // @ts-ignore
485
+ [t,];
486
+ var __VLS_115;
487
+ var __VLS_116;
488
+ let __VLS_120;
489
+ /** @ts-ignore @type { | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox'] | typeof __VLS_components.elCheckbox | typeof __VLS_components.ElCheckbox | typeof __VLS_components['el-checkbox']} */
490
+ elCheckbox;
491
+ // @ts-ignore
492
+ const __VLS_121 = __VLS_asFunctionalComponent1(__VLS_120, new __VLS_120({
493
+ // @ts-ignore
494
+ ...{ 'onChange': {} }, modelValue: (__VLS_ctx.modelValue.style.dataZoom),
495
+ }));
496
+ const __VLS_122 = __VLS_121({
497
+ ...{ 'onChange': {} },
498
+ modelValue: (__VLS_ctx.modelValue.style.dataZoom),
499
+ }, ...__VLS_functionalComponentArgsRest(__VLS_121));
500
+ let __VLS_125;
501
+ const __VLS_126 = {
502
+ /** @type {typeof __VLS_125.change} */
503
+ onChange: // @ts-ignore
504
+ (...[$event]) => {
505
+ void $event;
506
+ return (patchStyle({ dataZoom: Boolean($event) }));
507
+ // @ts-ignore
508
+ [modelValue,];
509
+ },
510
+ };
511
+ void __VLS_126;
512
+ const { default: __VLS_127 } = __VLS_nonNull(__VLS_123.slots);
513
+ (__VLS_unwrap(t, {})("bi.card.data_zoom"));
514
+ // @ts-ignore
515
+ [t,];
516
+ var __VLS_123;
517
+ var __VLS_124;
518
+ // @ts-ignore
519
+ [];
520
+ var __VLS_12;
521
+ // @ts-ignore
522
+ [];
523
+ const __VLS_export = (await import('vue')).defineComponent({
524
+ __typeEmits: {},
525
+ __typeProps: {},
526
+ });
527
+ export default {};
@@ -0,0 +1,20 @@
1
+ import type { BiCard } from "../rpc/bi/admin/v1/bi_card";
2
+ import type { BiQueryResult, BiQuerySpec, BiSourceDescriptor } from "../rpc/bi/admin/v1/bi_query";
3
+ type __VLS_Props = {
4
+ modelValue: boolean;
5
+ sources: BiSourceDescriptor[];
6
+ card?: BiCard;
7
+ initialQuery?: BiQuerySpec;
8
+ initialResult?: BiQueryResult;
9
+ initialTitle?: string;
10
+ initialChartType?: string;
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: boolean) => any;
14
+ saved: (card: BiCard) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ onSaved?: ((card: BiCard) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;