@bridge-ui/vue 0.17.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/bridge-ui-components/SKILL.md +33 -33
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +1 -1
- package/dist/Components/ChartAxis/ChartAxis.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartAxis/chartAxis.types.d.ts +17 -7
- package/dist/Components/ChartAxis/composables/useChartAxis.d.ts +2 -2
- package/dist/Components/ChartAxis/composables/useChartAxis.js +15 -10
- package/dist/Components/ChartBar/ChartBar.js +5 -0
- package/dist/Components/ChartBar/ChartBar.vue.d.ts +16 -0
- package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/Components/ChartBar/chartBar.types.d.ts +56 -0
- package/dist/Components/ChartBar/composables/useChartBar.d.ts +26 -0
- package/dist/Components/ChartBar/composables/useChartBar.js +13 -0
- package/dist/Components/ChartBar/index.d.ts +4 -0
- package/dist/Components/ChartBar/index.js +4 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.js +5 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue.d.ts +6 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +45 -0
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.d.ts +5 -0
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +20 -0
- package/dist/Components/ChartBarSeries/index.d.ts +3 -0
- package/dist/Components/ChartBarSeries/index.js +3 -0
- package/dist/Components/ChartFunnel/ChartFunnel.js +5 -0
- package/dist/Components/ChartFunnel/ChartFunnel.vue.d.ts +16 -0
- package/dist/Components/ChartFunnel/ChartFunnel.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/Components/ChartFunnel/chartFunnel.types.d.ts +54 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.d.ts +29 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.js +68 -0
- package/dist/Components/ChartFunnel/index.d.ts +4 -0
- package/dist/Components/ChartFunnel/index.js +4 -0
- package/dist/Components/ChartLegend/ChartLegend.vue.d.ts +2 -0
- package/dist/Components/ChartLegend/ChartLegend.vue_vue_type_script_setup_true_lang.js +33 -13
- package/dist/Components/ChartLegend/chartLegend.types.d.ts +41 -5
- package/dist/Components/ChartLegend/composables/useChartLegend.d.ts +9 -5
- package/dist/Components/ChartLegend/composables/useChartLegend.js +88 -54
- package/dist/Components/ChartLine/ChartLine.js +5 -0
- package/dist/Components/ChartLine/ChartLine.vue.d.ts +20 -0
- package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/Components/ChartLine/chartLine.types.d.ts +72 -0
- package/dist/Components/ChartLine/composables/useChartLine.d.ts +26 -0
- package/dist/Components/ChartLine/composables/useChartLine.js +13 -0
- package/dist/Components/ChartLine/index.d.ts +4 -0
- package/dist/Components/ChartLine/index.js +4 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.js +5 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue.d.ts +10 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +75 -0
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.d.ts +5 -0
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +25 -0
- package/dist/Components/ChartLineSeries/index.d.ts +3 -0
- package/dist/Components/ChartLineSeries/index.js +3 -0
- package/dist/Components/ChartPie/ChartPie.js +5 -0
- package/dist/Components/ChartPie/ChartPie.vue.d.ts +15 -0
- package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/Components/ChartPie/chartPie.types.d.ts +73 -0
- package/dist/Components/ChartPie/composables/useChartPie.d.ts +30 -0
- package/dist/Components/ChartPie/composables/useChartPie.js +71 -0
- package/dist/Components/ChartPie/index.d.ts +4 -0
- package/dist/Components/ChartPie/index.js +4 -0
- package/dist/Components/ChartScatter/ChartScatter.js +5 -0
- package/dist/Components/{Chart/Chart.vue.d.ts → ChartScatter/ChartScatter.vue.d.ts} +3 -2
- package/dist/Components/ChartScatter/ChartScatter.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/ChartScatter/chartScatter.types.d.ts +23 -0
- package/dist/Components/ChartScatter/composables/useChartScatter.d.ts +29 -0
- package/dist/Components/ChartScatter/composables/useChartScatter.js +103 -0
- package/dist/Components/ChartScatter/index.d.ts +4 -0
- package/dist/Components/ChartScatter/index.js +4 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.js +5 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +38 -0
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +18 -0
- package/dist/Components/ChartScatterSeries/index.d.ts +3 -0
- package/dist/Components/ChartScatterSeries/index.js +3 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +18 -10
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +24 -9
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +3 -1
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +79 -65
- package/dist/Components/ColorPicker/composables/useColorPicker.js +1 -1
- package/dist/Components/DatePicker/composables/useDatePicker.js +1 -1
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +1 -1
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +1 -1
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +1 -1
- package/dist/Components/FormField/composables/useFormField.js +3 -1
- package/dist/Components/OtpField/composables/useOtpField.js +90 -89
- package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
- package/dist/Components/Spinner/composables/useSpinner.d.ts +1 -1
- package/dist/Components/TimePicker/composables/useTimePicker.js +1 -1
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +1 -1
- package/dist/Utils/Charts/ChartFrame.js +5 -0
- package/dist/Utils/Charts/ChartFrame.vue.d.ts +24 -0
- package/dist/Utils/Charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/{Components/Chart → Utils/Charts}/chart.types.d.ts +16 -18
- package/dist/Utils/Charts/chartInjectionKey.d.ts +151 -0
- package/dist/{Components/Chart → Utils/Charts}/chartInjectionKey.js +2 -2
- package/dist/Utils/Charts/echarts/bar.d.ts +6 -0
- package/dist/Utils/Charts/echarts/bar.js +22 -0
- package/dist/Utils/Charts/echarts/cartesian.d.ts +15 -0
- package/dist/Utils/Charts/echarts/cartesian.js +255 -0
- package/dist/Utils/Charts/echarts/funnel.d.ts +15 -0
- package/dist/Utils/Charts/echarts/funnel.js +79 -0
- package/dist/Utils/Charts/echarts/line.d.ts +5 -0
- package/dist/Utils/Charts/echarts/line.js +19 -0
- package/dist/Utils/Charts/echarts/part.d.ts +19 -0
- package/dist/Utils/Charts/echarts/part.js +45 -0
- package/dist/Utils/Charts/echarts/pie.d.ts +14 -0
- package/dist/Utils/Charts/echarts/pie.js +75 -0
- package/dist/Utils/Charts/echarts/plot.d.ts +44 -0
- package/dist/Utils/Charts/echarts/plot.js +52 -0
- package/dist/Utils/Charts/echarts/scatter.d.ts +14 -0
- package/dist/Utils/Charts/echarts/scatter.js +152 -0
- package/dist/Utils/Charts/index.d.ts +6 -0
- package/dist/Utils/Charts/index.js +6 -0
- package/dist/Utils/Charts/useChartCartesian.d.ts +57 -0
- package/dist/Utils/Charts/useChartCartesian.js +155 -0
- package/dist/Utils/Charts/useChartPart.d.ts +45 -0
- package/dist/Utils/Charts/useChartPart.js +97 -0
- package/dist/Utils/Charts/useChartRegistry.d.ts +13 -0
- package/dist/Utils/Charts/useChartRegistry.js +40 -0
- package/dist/Utils/Charts/useChartRoot.d.ts +156 -0
- package/dist/Utils/Charts/useChartRoot.js +342 -0
- package/dist/Utils/Charts/useChartSeries.d.ts +10 -0
- package/dist/Utils/Charts/useChartSeries.js +22 -0
- package/dist/augments.d.ts +23 -7
- package/docs/README.md +6 -1
- package/docs/components/Chart.md +114 -154
- package/docs/components/ChartBar.md +137 -0
- package/docs/components/ChartFunnel.md +62 -0
- package/docs/components/ChartLine.md +151 -0
- package/docs/components/ChartPie.md +115 -0
- package/docs/components/ChartScatter.md +84 -0
- package/package.json +2 -2
- package/dist/Components/Chart/Chart.js +0 -5
- package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +0 -52
- package/dist/Components/Chart/chartInjectionKey.d.ts +0 -94
- package/dist/Components/Chart/composables/useChart.d.ts +0 -40
- package/dist/Components/Chart/composables/useChart.js +0 -346
- package/dist/Components/Chart/echartsChart.d.ts +0 -14
- package/dist/Components/Chart/echartsChart.js +0 -199
- package/dist/Components/Chart/index.d.ts +0 -4
- package/dist/Components/Chart/index.js +0 -4
- package/dist/Components/ChartSeries/ChartSeries.js +0 -5
- package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +0 -4
- package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +0 -24
- package/dist/Components/ChartSeries/chartSeries.types.d.ts +0 -37
- package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +0 -10
- package/dist/Components/ChartSeries/composables/useChartSeries.js +0 -29
- package/dist/Components/ChartSeries/index.d.ts +0 -3
- package/dist/Components/ChartSeries/index.js +0 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: bridge-ui-components
|
|
3
3
|
description: >-
|
|
4
4
|
Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, ActionFooter, Badge, Icon,
|
|
5
|
-
Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, Stepper, Carousel, Resizable,
|
|
5
|
+
Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, Stepper, Carousel, Resizable, ChartLine, ChartBar, ChartScatter, ChartPie, ChartFunnel, Pagination, TextField, Select,
|
|
6
6
|
Autocomplete, DateField, DatePicker, DateRangeField, DateRangePicker,
|
|
7
7
|
TimeField, TimePicker, DateTimeField, DateTimePicker, ColorField, ColorPicker,
|
|
8
8
|
classes, customProps, slots. Use when building UI with Bridge components.
|
|
@@ -16,38 +16,38 @@ In templates, use kebab-case attrs (`start-icon`, `custom-props`, `error-message
|
|
|
16
16
|
|
|
17
17
|
## Start here
|
|
18
18
|
|
|
19
|
-
| Need
|
|
20
|
-
|
|
|
21
|
-
| Actions
|
|
22
|
-
| Surfaces / modal body
|
|
23
|
-
| Avatar
|
|
24
|
-
| Badge
|
|
25
|
-
| Alert
|
|
26
|
-
| Accordion
|
|
27
|
-
| Action footer
|
|
28
|
-
| Stepper
|
|
29
|
-
| Carousel
|
|
30
|
-
| Resizable panels
|
|
31
|
-
|
|
|
32
|
-
| Icon
|
|
33
|
-
| Lists
|
|
34
|
-
| Table
|
|
35
|
-
| DataTable
|
|
36
|
-
| Tabs
|
|
37
|
-
| Text input
|
|
38
|
-
| Select / autocomplete
|
|
39
|
-
| Sidebar / app shell
|
|
40
|
-
| Date
|
|
41
|
-
| Date range
|
|
42
|
-
| Time
|
|
43
|
-
| Time range
|
|
44
|
-
| Date-time
|
|
45
|
-
| Date-time range
|
|
46
|
-
| Color
|
|
47
|
-
| Spinner / skeleton / progress
|
|
48
|
-
| Empty / no data
|
|
49
|
-
| Scroll fade / scrollbar
|
|
50
|
-
| Index
|
|
19
|
+
| Need | Doc |
|
|
20
|
+
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| Actions | `.ai/docs/components/Button.md`, `ButtonGroup.md` |
|
|
22
|
+
| Surfaces / modal body | `.ai/docs/components/Card.md` |
|
|
23
|
+
| Avatar | `.ai/docs/components/Avatar.md` |
|
|
24
|
+
| Badge | `.ai/docs/components/Badge.md` |
|
|
25
|
+
| Alert | `.ai/docs/components/Alert.md` |
|
|
26
|
+
| Accordion | `.ai/docs/components/Accordion.md` |
|
|
27
|
+
| Action footer | `.ai/docs/components/ActionFooter.md` |
|
|
28
|
+
| Stepper | `.ai/docs/components/Stepper.md` |
|
|
29
|
+
| Carousel | `.ai/docs/components/Carousel.md` |
|
|
30
|
+
| Resizable panels | `.ai/docs/components/Resizable.md` |
|
|
31
|
+
| Charts (line, area, sparkline, bar, scatter, pie, donut, funnel) | `.ai/docs/components/Chart.md`, then `ChartLine.md`, `ChartBar.md`, `ChartScatter.md`, `ChartPie.md`, `ChartFunnel.md` |
|
|
32
|
+
| Icon | `.ai/docs/components/Icon.md` |
|
|
33
|
+
| Lists | `.ai/docs/components/List.md` |
|
|
34
|
+
| Table | `.ai/docs/components/Table.md` |
|
|
35
|
+
| DataTable | `.ai/docs/components/DataTable.md` |
|
|
36
|
+
| Tabs | `.ai/docs/components/Tabs.md` |
|
|
37
|
+
| Text input | `.ai/docs/components/TextField.md` |
|
|
38
|
+
| Select / autocomplete | `.ai/docs/components/Select.md`, `Autocomplete.md` |
|
|
39
|
+
| Sidebar / app shell | `.ai/docs/components/Sidebar.md` |
|
|
40
|
+
| Date | `.ai/docs/components/DateField.md`, `DatePicker.md` |
|
|
41
|
+
| Date range | `.ai/docs/components/DateRangeField.md`, `DateRangePicker.md` |
|
|
42
|
+
| Time | `.ai/docs/components/TimeField.md`, `TimePicker.md` |
|
|
43
|
+
| Time range | `.ai/docs/components/TimeRangeField.md`, `TimeRangePicker.md` |
|
|
44
|
+
| Date-time | `.ai/docs/components/DateTimeField.md`, `DateTimePicker.md` |
|
|
45
|
+
| Date-time range | `.ai/docs/components/DateTimeRangeField.md`, `DateTimeRangePicker.md` |
|
|
46
|
+
| Color | `.ai/docs/components/ColorField.md`, `ColorPicker.md` |
|
|
47
|
+
| Spinner / skeleton / progress | `.ai/docs/components/Spinner.md`, `Skeleton.md`, `Progress.md` |
|
|
48
|
+
| Empty / no data | `.ai/docs/components/EmptyState.md` |
|
|
49
|
+
| Scroll fade / scrollbar | `.ai/docs/ScrollUtilities.md` |
|
|
50
|
+
| Index | `.ai/docs/README.md` |
|
|
51
51
|
|
|
52
52
|
## Hard rules
|
|
53
53
|
|
|
@@ -17,7 +17,7 @@ export declare function useCalendarMonth(props: MaybeRefOrGetter<CalendarMonthOw
|
|
|
17
17
|
year: import('vue').ComputedRef<number>;
|
|
18
18
|
merged: import('vue').ComputedRef<CalendarMonthMerged>;
|
|
19
19
|
months: import('vue').ComputedRef<CalendarMonthCell[]>;
|
|
20
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<CalendarMonthOwnProps, "error" | "color" | "classes" | "customProps" | "disabled" | "rounded" | "multiple" | "range" | "timeZone" | "readOnly" | "disableDates" | "disableMonths" | "disableYears" | "maxDate" | "minDate" | "previewDate" | "
|
|
20
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<CalendarMonthOwnProps, "error" | "color" | "classes" | "customProps" | "disabled" | "rounded" | "multiple" | "range" | "timeZone" | "year" | "readOnly" | "disableDates" | "disableMonths" | "disableYears" | "maxDate" | "minDate" | "previewDate" | "selection">>>>;
|
|
21
21
|
gridBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
22
22
|
role: string;
|
|
23
23
|
onMouseLeave: () => void;
|
|
@@ -193,7 +193,7 @@ function _(p, _, v, y) {
|
|
|
193
193
|
}))), Pe = r(() => n(T.value?.end, {}, g({
|
|
194
194
|
"flex min-w-72 flex-1 flex-col px-2.5 pb-2.5": !0,
|
|
195
195
|
[E.value.end ?? ""]: !0
|
|
196
|
-
}))), Fe = r(() => g({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-
|
|
196
|
+
}))), Fe = r(() => g({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Z = r(() => n(T.value?.selector, {
|
|
197
197
|
type: "button",
|
|
198
198
|
disabled: C.value.disabled
|
|
199
199
|
}, g({
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { ChartAxisPosition } from '@bridge-ui/core/Domain';
|
|
2
2
|
/**
|
|
3
|
-
* Axis options for the nearest `
|
|
3
|
+
* Axis options for the nearest `ChartLine`, `ChartBar`, or `ChartScatter`.
|
|
4
|
+
* Renders nothing.
|
|
4
5
|
*/
|
|
5
6
|
export interface ChartAxisOwnProps {
|
|
6
7
|
/**
|
|
7
|
-
* Formats tick labels
|
|
8
|
+
* Formats category tick labels (the category axis of `ChartLine` and
|
|
9
|
+
* `ChartBar`).
|
|
8
10
|
*
|
|
9
11
|
* @default undefined
|
|
10
12
|
*/
|
|
11
|
-
|
|
13
|
+
formatCategory?: (category: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Formats numeric tick labels: the value on a value axis, or the timestamp
|
|
16
|
+
* (ms) on a time axis.
|
|
17
|
+
*
|
|
18
|
+
* @default undefined
|
|
19
|
+
*/
|
|
20
|
+
formatTick?: (value: number) => string;
|
|
12
21
|
/**
|
|
13
22
|
* Draws grid lines for this axis.
|
|
14
23
|
*
|
|
15
|
-
* @default true for
|
|
24
|
+
* @default true for the value axis, false for the category axis
|
|
16
25
|
*/
|
|
17
26
|
grid?: boolean;
|
|
18
27
|
/**
|
|
@@ -28,19 +37,20 @@ export interface ChartAxisOwnProps {
|
|
|
28
37
|
*/
|
|
29
38
|
label?: string;
|
|
30
39
|
/**
|
|
31
|
-
* Upper bound
|
|
40
|
+
* Upper bound (value or time axis). The plot picks one when omitted.
|
|
32
41
|
*
|
|
33
42
|
* @default undefined
|
|
34
43
|
*/
|
|
35
44
|
max?: number;
|
|
36
45
|
/**
|
|
37
|
-
* Lower bound
|
|
46
|
+
* Lower bound (value or time axis). The plot picks one when omitted.
|
|
38
47
|
*
|
|
39
48
|
* @default undefined
|
|
40
49
|
*/
|
|
41
50
|
min?: number;
|
|
42
51
|
/**
|
|
43
|
-
* Which axis to configure
|
|
52
|
+
* Which axis to configure: `x` is horizontal, `y` is vertical. On a
|
|
53
|
+
* horizontal `ChartBar`, categories sit on `y` and values on `x`.
|
|
44
54
|
*/
|
|
45
55
|
position: ChartAxisPosition;
|
|
46
56
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChartAxisOptions } from '@bridge-ui/core/Domain';
|
|
2
2
|
import { ChartAxisProps } from '../chartAxis.types';
|
|
3
3
|
export declare function useChartAxis(props: ChartAxisProps): {
|
|
4
|
-
options: import('vue').ComputedRef<
|
|
4
|
+
options: import('vue').ComputedRef<ChartAxisOptions>;
|
|
5
5
|
};
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import { useChartContext as e } from "
|
|
1
|
+
import { useChartContext as e } from "../../../Utils/Charts/chartInjectionKey.js";
|
|
2
2
|
import { computed as t, onBeforeUnmount as n, watch as r } from "vue";
|
|
3
3
|
import { isNil as i, isUndefined as a, omitBy as o } from "es-toolkit/compat";
|
|
4
4
|
//#region src/Components/ChartAxis/composables/useChartAxis.ts
|
|
5
5
|
function s(s) {
|
|
6
|
-
let c = e();
|
|
7
|
-
|
|
6
|
+
let { setAxis: c, removeAxis: l } = e().value;
|
|
7
|
+
if (i(c) || i(l)) throw Error("ChartAxis must be used within ChartLine, ChartBar, or ChartScatter");
|
|
8
|
+
function u(e) {
|
|
8
9
|
return s.formatTick?.(e) ?? String(e);
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
+
function d(e) {
|
|
12
|
+
return s.formatCategory?.(e) ?? e;
|
|
13
|
+
}
|
|
14
|
+
let f = t(() => !i(s.formatTick)), p = t(() => !i(s.formatCategory)), m = t(() => o({
|
|
11
15
|
max: s.max,
|
|
12
16
|
min: s.min,
|
|
13
17
|
grid: s.grid,
|
|
14
18
|
label: s.label,
|
|
15
19
|
hidden: s.hidden,
|
|
16
20
|
tickCount: s.tickCount,
|
|
17
|
-
formatTick:
|
|
21
|
+
formatTick: f.value ? u : void 0,
|
|
22
|
+
formatCategory: p.value ? d : void 0
|
|
18
23
|
}, a));
|
|
19
24
|
return r(() => s.position, (e, t) => {
|
|
20
|
-
i(t) ||
|
|
21
|
-
}), r([
|
|
22
|
-
c
|
|
25
|
+
i(t) || l(t);
|
|
26
|
+
}), r([m, () => s.position], ([e, t]) => {
|
|
27
|
+
c(t, e);
|
|
23
28
|
}, { immediate: !0 }), n(() => {
|
|
24
|
-
|
|
25
|
-
}), { options:
|
|
29
|
+
l(s.position);
|
|
30
|
+
}), { options: m };
|
|
26
31
|
}
|
|
27
32
|
//#endregion
|
|
28
33
|
export { s as useChartAxis };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChartBarOwnProps } from './chartBar.types';
|
|
2
|
+
import { ChartSlots } from '../../Utils/Charts';
|
|
3
|
+
type __VLS_Slots = ChartSlots;
|
|
4
|
+
declare const __VLS_base: import('vue').DefineComponent<ChartBarOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartBarOwnProps> & Readonly<{}>, {
|
|
5
|
+
loading: boolean;
|
|
6
|
+
labels: boolean;
|
|
7
|
+
animation: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import e from "../../Utils/Charts/ChartFrame.js";
|
|
2
|
+
import { useChartBar as t } from "./composables/useChartBar.js";
|
|
3
|
+
import { createBlock as n, createSlots as r, defineComponent as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
|
|
4
|
+
//#region src/Components/ChartBar/ChartBar.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var l = /*@__PURE__*/ i({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ChartBar",
|
|
8
|
+
props: {
|
|
9
|
+
categories: {},
|
|
10
|
+
formatDate: {},
|
|
11
|
+
formatLabel: {},
|
|
12
|
+
labels: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
orientation: {},
|
|
17
|
+
radius: {},
|
|
18
|
+
stack: {},
|
|
19
|
+
animation: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
classes: {},
|
|
24
|
+
customProps: {},
|
|
25
|
+
height: {},
|
|
26
|
+
loading: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
palette: {},
|
|
31
|
+
size: {},
|
|
32
|
+
summary: {},
|
|
33
|
+
width: {}
|
|
34
|
+
},
|
|
35
|
+
setup(i) {
|
|
36
|
+
let { frame: l } = t(i, {
|
|
37
|
+
radius: 4,
|
|
38
|
+
size: "md",
|
|
39
|
+
height: 280,
|
|
40
|
+
labels: !1,
|
|
41
|
+
animation: !0,
|
|
42
|
+
orientation: "vertical"
|
|
43
|
+
});
|
|
44
|
+
return (t, i) => (a(), n(s(e), { frame: s(l) }, r({
|
|
45
|
+
default: c(() => [o(t.$slots, "default")]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, [t.$slots.empty ? {
|
|
48
|
+
name: "empty",
|
|
49
|
+
fn: c(() => [o(t.$slots, "empty")]),
|
|
50
|
+
key: "0"
|
|
51
|
+
} : void 0, t.$slots.loading ? {
|
|
52
|
+
name: "loading",
|
|
53
|
+
fn: c(() => [o(t.$slots, "loading")]),
|
|
54
|
+
key: "1"
|
|
55
|
+
} : void 0]), 1032, ["frame"]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
export { l as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { ChartOrientation } from '@bridge-ui/core/Domain';
|
|
3
|
+
import { MergeHtmlProps } from '@bridge-ui/core/Utils';
|
|
4
|
+
import { ChartRootOwnProps } from '../../Utils/Charts';
|
|
5
|
+
/**
|
|
6
|
+
* Bar chart root. Compose with `ChartBarSeries` (and `ChartLineSeries` for
|
|
7
|
+
* bar + line charts), `ChartAxis`, `ChartLegend`, and `ChartTooltip`. The
|
|
8
|
+
* plot is drawn by ECharts.
|
|
9
|
+
*/
|
|
10
|
+
export interface ChartBarOwnProps extends ChartRootOwnProps {
|
|
11
|
+
/**
|
|
12
|
+
* Category labels, or dates for a time axis (bars placed by time).
|
|
13
|
+
* Each series has one value per category.
|
|
14
|
+
*/
|
|
15
|
+
categories: Date[] | string[];
|
|
16
|
+
/**
|
|
17
|
+
* Formats date categories in the tooltip, data table, and summary.
|
|
18
|
+
* Time axis ticks use `ChartAxis` `formatTick` (it receives the timestamp).
|
|
19
|
+
*
|
|
20
|
+
* @default undefined
|
|
21
|
+
*/
|
|
22
|
+
formatDate?: (date: Date) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Formats value labels and reference line labels.
|
|
25
|
+
*
|
|
26
|
+
* @default undefined
|
|
27
|
+
*/
|
|
28
|
+
formatLabel?: (value: number) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Shows value labels on every series (per-series `labels` wins).
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
labels?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* `horizontal` puts categories on the `y` axis and values on `x`.
|
|
37
|
+
*
|
|
38
|
+
* @default "vertical"
|
|
39
|
+
*/
|
|
40
|
+
orientation?: ChartOrientation;
|
|
41
|
+
/**
|
|
42
|
+
* Corner radius (px) on the value end of each bar. In a stack, only the
|
|
43
|
+
* outermost bar is rounded.
|
|
44
|
+
*
|
|
45
|
+
* @default 4
|
|
46
|
+
*/
|
|
47
|
+
radius?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Stacks every bar series under this key (per-series `stack` wins). A
|
|
50
|
+
* `ChartLineSeries` inside stacks only with its own `stack`.
|
|
51
|
+
*
|
|
52
|
+
* @default undefined
|
|
53
|
+
*/
|
|
54
|
+
stack?: string;
|
|
55
|
+
}
|
|
56
|
+
export type ChartBarProps = MergeHtmlProps<ChartBarOwnProps, HTMLAttributes>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChartBarOwnProps } from '../chartBar.types';
|
|
2
|
+
import { ChartCartesianMerged } from '../../../Utils/Charts/useChartCartesian';
|
|
3
|
+
export declare function useChartBar(props: ChartBarOwnProps, libDefaults: Partial<ChartCartesianMerged>): {
|
|
4
|
+
frame: {
|
|
5
|
+
label: import('vue').ComputedRef<string>;
|
|
6
|
+
table: import('vue').ComputedRef<import('@bridge-ui/core/Domain').ChartTable>;
|
|
7
|
+
isEmpty: import('vue').ComputedRef<boolean>;
|
|
8
|
+
hostBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
9
|
+
plotBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
10
|
+
rootBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
11
|
+
liveBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
12
|
+
emptyBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
13
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
14
|
+
tableBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
15
|
+
centerBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
16
|
+
loadingBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
|
|
17
|
+
announcement: import('vue').ComputedRef<string>;
|
|
18
|
+
emptyMessage: import('vue').ComputedRef<string>;
|
|
19
|
+
rootRef: import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
|
|
20
|
+
plotRef: import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
|
|
21
|
+
hostRef: import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
|
|
22
|
+
};
|
|
23
|
+
merged: import('vue').ComputedRef<ChartCartesianMerged>;
|
|
24
|
+
context: import('vue').ComputedRef<import('..').ChartContextValue>;
|
|
25
|
+
options: import('vue').ComputedRef<import('@bridge-ui/core/Domain').ChartCartesianRenderOptions | null>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mountEchartsBar as e } from "../../../Utils/Charts/echarts/bar.js";
|
|
2
|
+
import { useChartCartesian as t } from "../../../Utils/Charts/useChartCartesian.js";
|
|
3
|
+
//#region src/Components/ChartBar/composables/useChartBar.ts
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
return t(n, {
|
|
6
|
+
libDefaults: r,
|
|
7
|
+
kind: "bar",
|
|
8
|
+
mount: e,
|
|
9
|
+
componentName: "ChartBar"
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as useChartBar };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { ChartBarOwnProps, ChartBarProps, } from './chartBar.types';
|
|
2
|
+
export { default as ChartBar } from './ChartBar.vue';
|
|
3
|
+
export { useChartBar } from './composables/useChartBar';
|
|
4
|
+
export { useChartContext, type ChartClasses, type ChartColorOverrides, type ChartColorValue, type ChartContextValue, type ChartCustomProps, type ChartSizeOverrides, type ChartSlots, } from '../../Utils/Charts';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChartBarSeriesOwnProps } from './chartBarSeries.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<ChartBarSeriesOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartBarSeriesOwnProps> & Readonly<{}>, {
|
|
3
|
+
labels: boolean;
|
|
4
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useChartBarSeries as e } from "./composables/useChartBarSeries.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, openBlock as r } from "vue";
|
|
3
|
+
//#region src/Components/ChartBarSeries/ChartBarSeries.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var i = {
|
|
5
|
+
hidden: "",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, a = /*@__PURE__*/ n({
|
|
8
|
+
__name: "ChartBarSeries",
|
|
9
|
+
props: {
|
|
10
|
+
color: {},
|
|
11
|
+
data: {},
|
|
12
|
+
labels: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
name: {},
|
|
17
|
+
reference: {},
|
|
18
|
+
stack: {}
|
|
19
|
+
},
|
|
20
|
+
setup(n) {
|
|
21
|
+
return e(n), (e, n) => (r(), t("span", i));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ChartDatum, ChartReference } from '@bridge-ui/core/Domain';
|
|
2
|
+
import { ChartColorValue } from '../../Utils/Charts';
|
|
3
|
+
/**
|
|
4
|
+
* One bar series registered on the nearest `ChartBar`. Renders nothing.
|
|
5
|
+
* Unset options fall back to the `ChartBar` props.
|
|
6
|
+
*/
|
|
7
|
+
export interface ChartBarSeriesOwnProps {
|
|
8
|
+
/**
|
|
9
|
+
* Series color (token key or CSS color). Falls back to the palette.
|
|
10
|
+
*
|
|
11
|
+
* @default undefined
|
|
12
|
+
*/
|
|
13
|
+
color?: ChartColorValue;
|
|
14
|
+
/**
|
|
15
|
+
* One value per `ChartBar` category. `null` leaves the slot empty.
|
|
16
|
+
*/
|
|
17
|
+
data: ChartDatum[];
|
|
18
|
+
/**
|
|
19
|
+
* Shows value labels on the bars.
|
|
20
|
+
*
|
|
21
|
+
* @default ChartBar `labels`
|
|
22
|
+
*/
|
|
23
|
+
labels?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Series name shown in the legend, tooltip, and data table.
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Reference lines: `{ type: "average" | "min" | "max" }` or
|
|
30
|
+
* `{ value }`, each with an optional `label`.
|
|
31
|
+
*
|
|
32
|
+
* @default undefined
|
|
33
|
+
*/
|
|
34
|
+
reference?: ChartReference | ChartReference[];
|
|
35
|
+
/**
|
|
36
|
+
* Stack key. Series with the same key stack.
|
|
37
|
+
*
|
|
38
|
+
* @default ChartBar `stack`
|
|
39
|
+
*/
|
|
40
|
+
stack?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* `ChartBarSeries` has no DOM element, so it takes no HTML attributes.
|
|
44
|
+
*/
|
|
45
|
+
export type ChartBarSeriesProps = ChartBarSeriesOwnProps;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChartBarSeriesOwnProps } from '../chartBarSeries.types';
|
|
2
|
+
import { ChartBarSeriesRegistration } from '../../../Utils/Charts';
|
|
3
|
+
export declare function useChartBarSeries(props: ChartBarSeriesOwnProps): {
|
|
4
|
+
entry: import('vue').ComputedRef<ChartBarSeriesRegistration>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useChartSeries as e } from "../../../Utils/Charts/useChartSeries.js";
|
|
2
|
+
import { castArray as t, isNil as n } from "es-toolkit/compat";
|
|
3
|
+
//#region src/Components/ChartBarSeries/composables/useChartBarSeries.ts
|
|
4
|
+
function r(r) {
|
|
5
|
+
return { entry: e({
|
|
6
|
+
families: ["bar"],
|
|
7
|
+
componentName: "ChartBarSeries",
|
|
8
|
+
entry: () => ({
|
|
9
|
+
kind: "bar",
|
|
10
|
+
name: r.name,
|
|
11
|
+
data: r.data,
|
|
12
|
+
color: r.color,
|
|
13
|
+
stack: r.stack,
|
|
14
|
+
labels: r.labels,
|
|
15
|
+
reference: n(r.reference) ? void 0 : t(r.reference)
|
|
16
|
+
})
|
|
17
|
+
}) };
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { r as useChartBarSeries };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChartFunnelOwnProps } from './chartFunnel.types';
|
|
2
|
+
import { ChartSlots } from '../../Utils/Charts';
|
|
3
|
+
type __VLS_Slots = ChartSlots;
|
|
4
|
+
declare const __VLS_base: import('vue').DefineComponent<ChartFunnelOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartFunnelOwnProps> & Readonly<{}>, {
|
|
5
|
+
loading: boolean;
|
|
6
|
+
labels: boolean;
|
|
7
|
+
animation: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import e from "../../Utils/Charts/ChartFrame.js";
|
|
2
|
+
import { useChartFunnel as t } from "./composables/useChartFunnel.js";
|
|
3
|
+
import { createBlock as n, createSlots as r, defineComponent as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
|
|
4
|
+
//#region src/Components/ChartFunnel/ChartFunnel.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var l = /*@__PURE__*/ i({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ChartFunnel",
|
|
8
|
+
props: {
|
|
9
|
+
align: {},
|
|
10
|
+
data: {},
|
|
11
|
+
labelContent: {},
|
|
12
|
+
labelPosition: {},
|
|
13
|
+
labels: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
sort: {},
|
|
18
|
+
animation: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
classes: {},
|
|
23
|
+
customProps: {},
|
|
24
|
+
height: {},
|
|
25
|
+
loading: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
palette: {},
|
|
30
|
+
size: {},
|
|
31
|
+
summary: {},
|
|
32
|
+
width: {}
|
|
33
|
+
},
|
|
34
|
+
setup(i) {
|
|
35
|
+
let { frame: l } = t(i, {
|
|
36
|
+
size: "md",
|
|
37
|
+
height: 280,
|
|
38
|
+
labels: !0,
|
|
39
|
+
align: "center",
|
|
40
|
+
animation: !0,
|
|
41
|
+
sort: "descending",
|
|
42
|
+
labelPosition: "inside"
|
|
43
|
+
});
|
|
44
|
+
return (t, i) => (a(), n(s(e), { frame: s(l) }, r({
|
|
45
|
+
default: c(() => [o(t.$slots, "default")]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, [t.$slots.empty ? {
|
|
48
|
+
name: "empty",
|
|
49
|
+
fn: c(() => [o(t.$slots, "empty")]),
|
|
50
|
+
key: "0"
|
|
51
|
+
} : void 0, t.$slots.loading ? {
|
|
52
|
+
name: "loading",
|
|
53
|
+
fn: c(() => [o(t.$slots, "loading")]),
|
|
54
|
+
key: "1"
|
|
55
|
+
} : void 0]), 1032, ["frame"]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
export { l as default };
|