@bridge-ui/vue 0.18.0 → 0.20.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 +35 -34
- package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +257 -265
- package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
- package/dist/Components/Calendar/composables/useCalendar.js +192 -187
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +243 -238
- package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +5 -0
- package/dist/Components/ChartBar/chartBar.types.d.ts +11 -1
- package/dist/Components/ChartBar/composables/useChartBar.js +4 -4
- package/dist/Components/ChartBar/index.d.ts +1 -1
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +24 -2
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +3 -0
- package/dist/Components/ChartBarSeries/index.d.ts +1 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.js +10 -10
- package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartLine/chartLine.types.d.ts +7 -0
- package/dist/Components/ChartLine/composables/useChartLine.js +1 -1
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +23 -2
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +3 -0
- package/dist/Components/ChartLineSeries/index.d.ts +1 -0
- package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/Components/ChartPie/chartPie.types.d.ts +20 -1
- package/dist/Components/ChartPie/composables/useChartPie.d.ts +1 -1
- package/dist/Components/ChartPie/composables/useChartPie.js +39 -29
- package/dist/Components/ChartScatter/composables/useChartScatter.js +63 -58
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +8 -1
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +2 -1
- package/dist/Components/ChartScatterSeries/index.d.ts +1 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +4 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +1 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +4 -0
- package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +1 -2
- package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -66
- package/dist/Components/DataTable/composables/useDataTable.js +267 -349
- package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +1 -2
- package/dist/Components/Heading/Heading.js +5 -0
- package/dist/Components/Heading/Heading.vue.d.ts +11 -0
- package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
- package/dist/Components/Heading/composables/useHeading.js +56 -0
- package/dist/Components/Heading/heading.types.d.ts +56 -0
- package/dist/Components/Heading/index.d.ts +3 -0
- package/dist/Components/Heading/index.js +3 -0
- package/dist/Components/ListItem/composables/useListItem.js +29 -30
- package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +0 -5
- package/dist/Components/Listbox/composables/useListboxNavigation.js +23 -50
- package/dist/Components/Listbox/index.d.ts +1 -1
- package/dist/Components/Listbox/index.js +5 -5
- package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +31 -31
- package/dist/Components/Select/composables/useSelect.js +201 -211
- package/dist/Components/Slider/composables/useSlider.js +93 -122
- package/dist/Components/Text/Text.js +5 -0
- package/dist/Components/Text/Text.vue.d.ts +11 -0
- package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/Text/composables/useText.d.ts +9 -0
- package/dist/Components/Text/composables/useText.js +56 -0
- package/dist/Components/Text/index.d.ts +3 -0
- package/dist/Components/Text/index.js +3 -0
- package/dist/Components/Text/text.types.d.ts +76 -0
- package/dist/Utils/Charts/chart.types.d.ts +17 -0
- package/dist/Utils/Charts/chartInjectionKey.d.ts +2 -2
- package/dist/Utils/Charts/index.d.ts +1 -1
- package/dist/Utils/Charts/useChartCartesian.d.ts +4 -2
- package/dist/Utils/Charts/useChartCartesian.js +90 -76
- package/dist/augments.d.ts +10 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +175 -171
- package/docs/README.md +2 -0
- package/docs/components/BridgeUIProvider.md +1 -1
- package/docs/components/Card.md +15 -0
- package/docs/components/Chart.md +17 -10
- package/docs/components/ChartBar.md +70 -17
- package/docs/components/ChartLine.md +57 -16
- package/docs/components/ChartPie.md +33 -10
- package/docs/components/ChartScatter.md +25 -7
- package/docs/components/Heading.md +85 -0
- package/docs/components/Text.md +118 -0
- package/package.json +2 -2
- package/dist/Components/RichTextEditor/tiptapEditor.d.ts +0 -111
- package/dist/Components/RichTextEditor/tiptapEditor.js +0 -121
- package/dist/Utils/Charts/echarts/bar.d.ts +0 -6
- package/dist/Utils/Charts/echarts/bar.js +0 -22
- package/dist/Utils/Charts/echarts/cartesian.d.ts +0 -15
- package/dist/Utils/Charts/echarts/cartesian.js +0 -255
- package/dist/Utils/Charts/echarts/funnel.d.ts +0 -15
- package/dist/Utils/Charts/echarts/funnel.js +0 -79
- package/dist/Utils/Charts/echarts/line.d.ts +0 -5
- package/dist/Utils/Charts/echarts/line.js +0 -19
- package/dist/Utils/Charts/echarts/part.d.ts +0 -19
- package/dist/Utils/Charts/echarts/part.js +0 -45
- package/dist/Utils/Charts/echarts/pie.d.ts +0 -14
- package/dist/Utils/Charts/echarts/pie.js +0 -75
- package/dist/Utils/Charts/echarts/plot.d.ts +0 -44
- package/dist/Utils/Charts/echarts/plot.js +0 -52
- package/dist/Utils/Charts/echarts/scatter.d.ts +0 -14
- package/dist/Utils/Charts/echarts/scatter.js +0 -152
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useDateAdapter as e } from "../../../Adapters/Date/useDateAdapter.js";
|
|
2
2
|
import { useResolveMessage as t } from "../../../Adapters/I18n/useI18nAdapter.js";
|
|
3
|
-
import { mergePartBind as n, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as
|
|
4
|
-
import { computed as
|
|
5
|
-
import { get as
|
|
6
|
-
import {
|
|
7
|
-
import { calendarRoundedProps as
|
|
8
|
-
import { cn as
|
|
3
|
+
import { mergePartBind as n, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
|
|
4
|
+
import { computed as i, getCurrentInstance as a, ref as o, toValue as s, useAttrs as te } from "vue";
|
|
5
|
+
import { get as ne, isFunction as c, isNil as l, omit as re } from "es-toolkit/compat";
|
|
6
|
+
import { CALENDAR_YEAR_PAGE_SIZE as ie, applyDateSelection as u, calendarPanelViewFromGranularity as d, getCalendarNavigationMessage as f, getCalendarYearPageStart as p, isCalendarMonthPanelHidden as m, isCalendarYearPanelHidden as h, isDateRangeValue as g, resolveCalendarFocusDate as ae, resolveCalendarMonthSelection as oe, resolveCalendarNavigation as se, resolveCalendarPanelView as _, resolveCalendarYearSelection as ce } from "@bridge-ui/core/Domain";
|
|
7
|
+
import { calendarRoundedProps as le } from "@bridge-ui/core/Tokens";
|
|
8
|
+
import { cn as v, mergeBridgeUILayeredClasses as ue, splitComponentProps as de } from "@bridge-ui/core/Utils";
|
|
9
9
|
//#region src/Components/CalendarRange/composables/useCalendarRange.ts
|
|
10
|
-
var
|
|
10
|
+
var fe = [
|
|
11
11
|
"fill",
|
|
12
12
|
"color",
|
|
13
13
|
"error",
|
|
@@ -34,285 +34,290 @@ var ce = [
|
|
|
34
34
|
"disableMonths",
|
|
35
35
|
"hideOutsideDays"
|
|
36
36
|
];
|
|
37
|
-
function
|
|
38
|
-
return
|
|
37
|
+
function pe(e) {
|
|
38
|
+
return g(e) ? e : null;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function _(p, _, v, y) {
|
|
44
|
-
let de = o(), b = e(), x = t(), S = r(() => se({
|
|
45
|
-
bridgeKeys: ce,
|
|
40
|
+
function y(g, y, b, x) {
|
|
41
|
+
let S = te(), C = e(), w = t(), T = i(() => de({
|
|
42
|
+
bridgeKeys: fe,
|
|
46
43
|
props: {
|
|
47
|
-
...
|
|
48
|
-
...
|
|
44
|
+
...S,
|
|
45
|
+
...s(g)
|
|
49
46
|
}
|
|
50
|
-
})), { merged:
|
|
51
|
-
libDefaults:
|
|
47
|
+
})), { merged: E, entry: me } = ee({
|
|
48
|
+
libDefaults: y,
|
|
52
49
|
componentName: "Calendar",
|
|
53
|
-
props: () =>
|
|
54
|
-
}),
|
|
50
|
+
props: () => T.value.componentProps
|
|
51
|
+
}), D = i(() => E.value.customProps), he = i(() => re(T.value.inheritedAttrs, [
|
|
55
52
|
"onChange",
|
|
56
53
|
"onViewDateChange",
|
|
57
54
|
"onPreviewDateChange",
|
|
58
55
|
"onUpdate:modelValue"
|
|
59
|
-
])),
|
|
60
|
-
props: () =>
|
|
61
|
-
entry:
|
|
62
|
-
}),
|
|
63
|
-
let e =
|
|
64
|
-
return !
|
|
65
|
-
}),
|
|
66
|
-
hideYears:
|
|
67
|
-
hideMonths:
|
|
68
|
-
granularity:
|
|
69
|
-
view:
|
|
70
|
-
})),
|
|
71
|
-
view:
|
|
72
|
-
granularity:
|
|
73
|
-
hideYears:
|
|
74
|
-
hideMonths:
|
|
75
|
-
})),
|
|
76
|
-
let e =
|
|
77
|
-
return
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
56
|
+
])), O = r({
|
|
57
|
+
props: () => T.value.componentProps,
|
|
58
|
+
entry: i(() => {})
|
|
59
|
+
}), k = i(() => E.value.timeZone), A = i(() => s(g)), j = i(() => {
|
|
60
|
+
let e = a()?.vnode.props ?? {}, t = c(e.onViewDateChange) || c(e["onUpdate:viewDate"]);
|
|
61
|
+
return !l(A.value.viewDate) && t;
|
|
62
|
+
}), M = i(() => !l(A.value.previewDate)), N = o(_({
|
|
63
|
+
hideYears: E.value.hideYears,
|
|
64
|
+
hideMonths: E.value.hideMonths,
|
|
65
|
+
granularity: A.value.granularity ?? "day",
|
|
66
|
+
view: A.value.defaultView ?? d(A.value.granularity ?? "day")
|
|
67
|
+
})), P = o(C.value.startOfMonth(l(A.value.viewDate) ? ae(b.value, C.value, k.value) : A.value.viewDate, k.value)), F = o(null), I = o(null), L = i(() => E.value.granularity ?? "day"), R = i(() => _({
|
|
68
|
+
view: N.value,
|
|
69
|
+
granularity: L.value,
|
|
70
|
+
hideYears: E.value.hideYears,
|
|
71
|
+
hideMonths: E.value.hideMonths
|
|
72
|
+
})), z = i(() => j.value ? A.value.viewDate : P.value), B = i(() => C.value.addMonths(z.value, 1, k.value)), ge = i(() => M.value ? A.value.previewDate ?? null : F.value), _e = i(() => String(C.value.getYear(z.value, k.value))), ve = i(() => C.value.getMonthNames()[C.value.getMonth(z.value, k.value)] ?? ""), ye = i(() => C.value.getMonthNames()[C.value.getMonth(B.value, k.value)] ?? ""), V = i(() => C.value.getYear(z.value, k.value)), H = i(() => C.value.getMonth(z.value, k.value)), U = i(() => l(I.value) ? p(V.value) : I.value), W = i(() => {
|
|
73
|
+
let e = ue(le, me.value?.tokens?.rounded);
|
|
74
|
+
return ne(e, E.value.rounded);
|
|
75
|
+
}), G = (e) => {
|
|
76
|
+
N.value = e;
|
|
77
|
+
}, be = () => {
|
|
78
|
+
I.value = p(V.value), G("year");
|
|
79
|
+
}, K = (e) => {
|
|
80
|
+
let t = C.value.startOfMonth(e, k.value);
|
|
81
|
+
j.value || (P.value = t), x("viewDateChange", t);
|
|
82
|
+
}, xe = (e) => {
|
|
83
|
+
K(e);
|
|
84
|
+
}, Se = (e) => {
|
|
85
|
+
K(C.value.addMonths(e, -1, k.value));
|
|
82
86
|
}, q = (e) => {
|
|
83
|
-
let t =
|
|
84
|
-
|
|
85
|
-
}, he = (e) => {
|
|
86
|
-
q(e);
|
|
87
|
-
}, ge = (e) => {
|
|
88
|
-
q(b.value.addMonths(e, -1, D.value));
|
|
87
|
+
let t = pe(e);
|
|
88
|
+
b.value = t, x("change", t);
|
|
89
89
|
}, J = (e) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
q(b.value.addMonths(L.value, -1, D.value));
|
|
104
|
-
}, ye = () => {
|
|
105
|
-
if (I.value === "year") {
|
|
106
|
-
P.value = W.value + 15;
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
if (I.value === "month") {
|
|
110
|
-
q(b.value.addYears(L.value, 1, D.value));
|
|
90
|
+
M.value || (F.value = e), x("previewDateChange", e);
|
|
91
|
+
}, Y = (e) => {
|
|
92
|
+
let t = se({
|
|
93
|
+
direction: e,
|
|
94
|
+
view: R.value,
|
|
95
|
+
adapter: C.value,
|
|
96
|
+
viewDate: z.value,
|
|
97
|
+
timeZone: k.value,
|
|
98
|
+
yearPageStart: U.value
|
|
99
|
+
});
|
|
100
|
+
if (t.type === "yearPage") {
|
|
101
|
+
I.value = t.yearPageStart;
|
|
111
102
|
return;
|
|
112
103
|
}
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
|
|
104
|
+
K(t.viewDate);
|
|
105
|
+
}, Ce = () => {
|
|
106
|
+
Y(-1);
|
|
107
|
+
}, we = () => {
|
|
108
|
+
Y(1);
|
|
109
|
+
}, Te = () => {
|
|
110
|
+
let e = C.value.startOfMonth(C.value.now(k.value), k.value);
|
|
111
|
+
I.value = null, K(e), G(d(L.value));
|
|
112
|
+
}, Ee = (e) => {
|
|
113
|
+
I.value = null;
|
|
114
|
+
let t = ce({
|
|
115
|
+
year: e,
|
|
116
|
+
adapter: C.value,
|
|
117
|
+
viewDate: z.value,
|
|
118
|
+
timeZone: k.value,
|
|
119
|
+
granularity: L.value,
|
|
120
|
+
hideMonths: E.value.hideMonths
|
|
121
|
+
});
|
|
122
|
+
if (K(t.viewDate), t.type === "commit") {
|
|
123
|
+
q(u({
|
|
122
124
|
mode: "range",
|
|
123
|
-
value:
|
|
124
|
-
|
|
125
|
-
adapter:
|
|
126
|
-
timeZone:
|
|
127
|
-
|
|
125
|
+
value: b.value,
|
|
126
|
+
next: t.date,
|
|
127
|
+
adapter: C.value,
|
|
128
|
+
timeZone: k.value,
|
|
129
|
+
granularity: L.value
|
|
128
130
|
}));
|
|
129
131
|
return;
|
|
130
132
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
G(t.view);
|
|
134
|
+
}, X = () => {
|
|
135
|
+
G("month");
|
|
136
|
+
}, De = (e) => {
|
|
137
|
+
let t = oe({
|
|
138
|
+
month: e,
|
|
139
|
+
adapter: C.value,
|
|
140
|
+
viewDate: z.value,
|
|
141
|
+
timeZone: k.value,
|
|
142
|
+
granularity: L.value
|
|
143
|
+
});
|
|
144
|
+
if (K(t.viewDate), t.type === "commit") {
|
|
145
|
+
q(u({
|
|
141
146
|
mode: "range",
|
|
142
|
-
value:
|
|
143
|
-
|
|
144
|
-
adapter:
|
|
145
|
-
timeZone:
|
|
146
|
-
|
|
147
|
+
value: b.value,
|
|
148
|
+
next: t.date,
|
|
149
|
+
adapter: C.value,
|
|
150
|
+
timeZone: k.value,
|
|
151
|
+
granularity: L.value
|
|
147
152
|
}));
|
|
148
153
|
return;
|
|
149
154
|
}
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
color:
|
|
153
|
-
error:
|
|
154
|
-
rounded:
|
|
155
|
-
maxDate:
|
|
156
|
-
minDate:
|
|
157
|
-
disabled:
|
|
158
|
-
readOnly:
|
|
159
|
-
timeZone:
|
|
160
|
-
})),
|
|
155
|
+
G(t.view);
|
|
156
|
+
}, Oe = V, ke = H, Ae = i(() => ({
|
|
157
|
+
color: E.value.color,
|
|
158
|
+
error: E.value.error,
|
|
159
|
+
rounded: E.value.rounded,
|
|
160
|
+
maxDate: E.value.maxDate,
|
|
161
|
+
minDate: E.value.minDate,
|
|
162
|
+
disabled: E.value.disabled,
|
|
163
|
+
readOnly: E.value.readOnly,
|
|
164
|
+
timeZone: E.value.timeZone
|
|
165
|
+
})), Z = i(() => E.value.orientation === "vertical"), je = i(() => n(D.value?.root, he.value, v({
|
|
161
166
|
"flex flex-col overflow-hidden": !0,
|
|
162
|
-
"w-full":
|
|
167
|
+
"w-full": E.value.fill,
|
|
163
168
|
"min-w-max": !0,
|
|
164
|
-
"w-fit": !
|
|
165
|
-
[
|
|
166
|
-
}))),
|
|
169
|
+
"w-fit": !E.value.fill && Z.value,
|
|
170
|
+
[O.value.root ?? ""]: !0
|
|
171
|
+
}))), Me = i(() => n(D.value?.header, {}, v({
|
|
167
172
|
"relative flex w-full items-center p-2.5": !0,
|
|
168
|
-
[
|
|
169
|
-
}))),
|
|
173
|
+
[O.value.header ?? ""]: !0
|
|
174
|
+
}))), Ne = i(() => n(D.value?.months, {}, v({
|
|
170
175
|
"flex min-w-0 flex-1 items-center justify-center": !0,
|
|
171
|
-
[
|
|
172
|
-
}))),
|
|
176
|
+
[O.value.months ?? ""]: !0
|
|
177
|
+
}))), Pe = i(() => n(D.value?.startHeader, {}, v({
|
|
173
178
|
"flex min-w-0 flex-1 items-center pr-4": !0,
|
|
174
|
-
[
|
|
175
|
-
}))),
|
|
179
|
+
[O.value.startHeader ?? ""]: !0
|
|
180
|
+
}))), Fe = i(() => n(D.value?.endHeader, {}, v({
|
|
176
181
|
"items-center": !0,
|
|
177
|
-
"flex min-w-0 flex-1 items-center pl-4": !
|
|
178
|
-
"flex justify-center":
|
|
179
|
-
[
|
|
180
|
-
}))),
|
|
182
|
+
"flex min-w-0 flex-1 items-center pl-4": !Z.value || R.value === "month",
|
|
183
|
+
"flex justify-center": Z.value && R.value !== "month",
|
|
184
|
+
[O.value.endHeader ?? ""]: !0
|
|
185
|
+
}))), Ie = i(() => n(D.value?.body, {}, v({
|
|
181
186
|
"relative flex min-h-64 flex-col": !0,
|
|
182
|
-
[
|
|
183
|
-
}))),
|
|
187
|
+
[O.value.body ?? ""]: !0
|
|
188
|
+
}))), Le = i(() => n(D.value?.panels, { "aria-hidden": R.value !== "date" }, v({
|
|
184
189
|
"flex w-full": !0,
|
|
185
|
-
"flex-row": !
|
|
186
|
-
"flex-col":
|
|
187
|
-
invisible:
|
|
188
|
-
[
|
|
189
|
-
}))),
|
|
190
|
+
"flex-row": !Z.value,
|
|
191
|
+
"flex-col": Z.value,
|
|
192
|
+
invisible: R.value !== "date",
|
|
193
|
+
[O.value.panels ?? ""]: !0
|
|
194
|
+
}))), Re = i(() => n(D.value?.start, {}, v({
|
|
190
195
|
"flex min-w-72 flex-1 flex-col px-2.5": !0,
|
|
191
|
-
"pb-2.5": !
|
|
192
|
-
[
|
|
193
|
-
}))),
|
|
196
|
+
"pb-2.5": !Z.value,
|
|
197
|
+
[O.value.start ?? ""]: !0
|
|
198
|
+
}))), ze = i(() => n(D.value?.end, {}, v({
|
|
194
199
|
"flex min-w-72 flex-1 flex-col px-2.5 pb-2.5": !0,
|
|
195
|
-
[
|
|
196
|
-
}))),
|
|
200
|
+
[O.value.end ?? ""]: !0
|
|
201
|
+
}))), Be = i(() => v({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Q = i(() => n(D.value?.selector, {
|
|
197
202
|
type: "button",
|
|
198
|
-
disabled:
|
|
199
|
-
},
|
|
203
|
+
disabled: E.value.disabled
|
|
204
|
+
}, v({
|
|
200
205
|
"inline-flex cursor-pointer items-center gap-x-2 px-1.5 py-1 text-sm font-medium text-dark-600 hover:bg-dark-100 focus:outline-none disabled:cursor-not-allowed dark:text-dark-300 dark:hover:bg-dark-800": !0,
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
-
}))),
|
|
206
|
+
[W.value ?? ""]: !0,
|
|
207
|
+
[O.value.selector ?? ""]: !0
|
|
208
|
+
}))), $ = i(() => n(D.value?.navButton, {
|
|
204
209
|
type: "button",
|
|
205
|
-
disabled:
|
|
206
|
-
},
|
|
210
|
+
disabled: E.value.disabled
|
|
211
|
+
}, v({
|
|
207
212
|
"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center text-dark-600 hover:bg-dark-100 disabled:cursor-not-allowed dark:text-dark-300 dark:hover:bg-dark-800": !0,
|
|
208
|
-
[
|
|
209
|
-
[
|
|
210
|
-
}))),
|
|
211
|
-
|
|
212
|
-
onClick:
|
|
213
|
+
[W.value ?? ""]: !0,
|
|
214
|
+
[O.value.navButton ?? ""]: !0
|
|
215
|
+
}))), Ve = i(() => w(f(R.value, -1))), He = i(() => w(f(R.value, 1))), Ue = i(() => n(D.value?.previousButton, {
|
|
216
|
+
...$.value,
|
|
217
|
+
onClick: Ce,
|
|
213
218
|
type: "button",
|
|
214
|
-
disabled:
|
|
215
|
-
"aria-label":
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
onClick:
|
|
219
|
+
disabled: E.value.disabled,
|
|
220
|
+
"aria-label": Ve.value
|
|
221
|
+
}, v({ [O.value.navButton ?? ""]: !0 }))), We = i(() => n(D.value?.nextButton, {
|
|
222
|
+
...$.value,
|
|
223
|
+
onClick: we,
|
|
219
224
|
type: "button",
|
|
220
|
-
disabled:
|
|
221
|
-
"aria-label":
|
|
222
|
-
},
|
|
223
|
-
onClick:
|
|
225
|
+
disabled: E.value.disabled,
|
|
226
|
+
"aria-label": He.value
|
|
227
|
+
}, v({ [O.value.navButton ?? ""]: !0 }))), Ge = i(() => n(D.value?.todayButton, {
|
|
228
|
+
onClick: Te,
|
|
224
229
|
type: "button",
|
|
225
|
-
disabled:
|
|
226
|
-
"aria-label":
|
|
227
|
-
},
|
|
230
|
+
disabled: E.value.disabled,
|
|
231
|
+
"aria-label": w("Today")
|
|
232
|
+
}, v({
|
|
228
233
|
"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center hover:bg-dark-100 disabled:cursor-not-allowed dark:hover:bg-dark-800": !0,
|
|
229
|
-
[
|
|
230
|
-
[
|
|
231
|
-
}))),
|
|
232
|
-
...
|
|
233
|
-
onClick:
|
|
234
|
+
[W.value ?? ""]: !0,
|
|
235
|
+
[O.value.navButton ?? ""]: !0
|
|
236
|
+
}))), Ke = i(() => n(D.value?.selector, void 0, {
|
|
237
|
+
...Q.value,
|
|
238
|
+
onClick: be,
|
|
234
239
|
type: "button",
|
|
235
|
-
"aria-label":
|
|
236
|
-
disabled:
|
|
237
|
-
granularity:
|
|
238
|
-
hideYears:
|
|
240
|
+
"aria-label": w("Select year"),
|
|
241
|
+
disabled: E.value.disabled || h({
|
|
242
|
+
granularity: L.value,
|
|
243
|
+
hideYears: E.value.hideYears
|
|
239
244
|
})
|
|
240
|
-
})),
|
|
241
|
-
...n(
|
|
242
|
-
...
|
|
245
|
+
})), qe = i(() => ({
|
|
246
|
+
...n(D.value?.selector, void 0, {
|
|
247
|
+
...Q.value,
|
|
243
248
|
type: "button",
|
|
244
|
-
"aria-label":
|
|
245
|
-
disabled:
|
|
246
|
-
granularity:
|
|
247
|
-
hideMonths:
|
|
249
|
+
"aria-label": w("Select month"),
|
|
250
|
+
disabled: E.value.disabled || m({
|
|
251
|
+
granularity: L.value,
|
|
252
|
+
hideMonths: E.value.hideMonths
|
|
248
253
|
})
|
|
249
254
|
}),
|
|
250
|
-
onClick:
|
|
251
|
-
})),
|
|
252
|
-
...n(
|
|
253
|
-
...
|
|
255
|
+
onClick: X
|
|
256
|
+
})), Je = i(() => ({
|
|
257
|
+
...n(D.value?.selector, void 0, {
|
|
258
|
+
...Q.value,
|
|
254
259
|
type: "button",
|
|
255
|
-
"aria-label":
|
|
256
|
-
disabled:
|
|
257
|
-
granularity:
|
|
258
|
-
hideMonths:
|
|
260
|
+
"aria-label": w("Select end month"),
|
|
261
|
+
disabled: E.value.disabled || m({
|
|
262
|
+
granularity: L.value,
|
|
263
|
+
hideMonths: E.value.hideMonths
|
|
259
264
|
})
|
|
260
265
|
}),
|
|
261
|
-
onClick:
|
|
262
|
-
})),
|
|
263
|
-
granularity:
|
|
264
|
-
hideYears:
|
|
265
|
-
})),
|
|
266
|
-
granularity:
|
|
267
|
-
hideMonths:
|
|
266
|
+
onClick: X
|
|
267
|
+
})), Ye = i(() => !h({
|
|
268
|
+
granularity: L.value,
|
|
269
|
+
hideYears: E.value.hideYears
|
|
270
|
+
})), Xe = i(() => !m({
|
|
271
|
+
granularity: L.value,
|
|
272
|
+
hideMonths: E.value.hideMonths
|
|
268
273
|
}));
|
|
269
274
|
return {
|
|
270
|
-
view:
|
|
271
|
-
model:
|
|
272
|
-
shared:
|
|
273
|
-
merged:
|
|
274
|
-
showNav:
|
|
275
|
-
endBind:
|
|
276
|
-
rootBind:
|
|
277
|
-
bodyBind:
|
|
278
|
-
viewDate:
|
|
279
|
-
viewYear:
|
|
280
|
-
startBind:
|
|
281
|
-
viewMonth:
|
|
282
|
-
yearLabel:
|
|
283
|
-
monthLabel:
|
|
284
|
-
headerBind:
|
|
285
|
-
monthsBind:
|
|
286
|
-
panelsBind:
|
|
287
|
-
isVertical:
|
|
288
|
-
endViewDate:
|
|
289
|
-
previewDate:
|
|
290
|
-
setViewDate:
|
|
291
|
-
navIconBind:
|
|
292
|
-
granularity:
|
|
293
|
-
handleChange:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
275
|
+
view: R,
|
|
276
|
+
model: b,
|
|
277
|
+
shared: Ae,
|
|
278
|
+
merged: E,
|
|
279
|
+
showNav: i(() => !0),
|
|
280
|
+
endBind: ze,
|
|
281
|
+
rootBind: je,
|
|
282
|
+
bodyBind: Ie,
|
|
283
|
+
viewDate: z,
|
|
284
|
+
viewYear: V,
|
|
285
|
+
startBind: Re,
|
|
286
|
+
viewMonth: H,
|
|
287
|
+
yearLabel: _e,
|
|
288
|
+
monthLabel: ve,
|
|
289
|
+
headerBind: Me,
|
|
290
|
+
monthsBind: Ne,
|
|
291
|
+
panelsBind: Le,
|
|
292
|
+
isVertical: Z,
|
|
293
|
+
endViewDate: B,
|
|
294
|
+
previewDate: ge,
|
|
295
|
+
setViewDate: K,
|
|
296
|
+
navIconBind: i(() => D.value?.navIcon),
|
|
297
|
+
granularity: L,
|
|
298
|
+
handleChange: q,
|
|
299
|
+
endMonthLabel: ye,
|
|
300
|
+
endHeaderBind: Fe,
|
|
301
|
+
monthYearBind: Be,
|
|
302
|
+
nextButtonBind: We,
|
|
303
|
+
monthPanelYear: Oe,
|
|
304
|
+
startHeaderBind: Pe,
|
|
305
|
+
todayButtonBind: Ge,
|
|
306
|
+
monthPanelValue: ke,
|
|
307
|
+
yearSelectorBind: Ke,
|
|
308
|
+
handleYearSelect: Ee,
|
|
309
|
+
showYearSelector: Ye,
|
|
310
|
+
monthSelectorBind: qe,
|
|
311
|
+
handleMonthSelect: De,
|
|
312
|
+
showMonthSelector: Xe,
|
|
313
|
+
previousButtonBind: Ue,
|
|
314
|
+
endMonthSelectorBind: Je,
|
|
315
|
+
handleEndViewDateChange: Se,
|
|
316
|
+
handlePreviewDateChange: J,
|
|
317
|
+
handleStartViewDateChange: xe,
|
|
318
|
+
yearPageStart: U,
|
|
319
|
+
yearPageSize: ie
|
|
315
320
|
};
|
|
316
321
|
}
|
|
317
322
|
//#endregion
|
|
318
|
-
export {
|
|
323
|
+
export { y as useCalendarRange };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'vue';
|
|
2
2
|
import { ChartOrientation } from '@bridge-ui/core/Domain';
|
|
3
3
|
import { MergeHtmlProps } from '@bridge-ui/core/Utils';
|
|
4
|
-
import { ChartRootOwnProps } from '../../Utils/Charts';
|
|
4
|
+
import { ChartCategoryColors, ChartRootOwnProps } from '../../Utils/Charts';
|
|
5
5
|
/**
|
|
6
6
|
* Bar chart root. Compose with `ChartBarSeries` (and `ChartLineSeries` for
|
|
7
7
|
* bar + line charts), `ChartAxis`, `ChartLegend`, and `ChartTooltip`. The
|
|
@@ -13,6 +13,16 @@ export interface ChartBarOwnProps extends ChartRootOwnProps {
|
|
|
13
13
|
* Each series has one value per category.
|
|
14
14
|
*/
|
|
15
15
|
categories: Date[] | string[];
|
|
16
|
+
/**
|
|
17
|
+
* Gives each category its own bar color: `true` takes palette entries in
|
|
18
|
+
* category order, an array follows the category order, and a record maps
|
|
19
|
+
* category labels. Every bar series in a category shares the color (use
|
|
20
|
+
* `tone` to tell them apart); the legend shows each series in a neutral
|
|
21
|
+
* color. `ChartLineSeries` keep their own color.
|
|
22
|
+
*
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
categoryColors?: ChartCategoryColors;
|
|
16
26
|
/**
|
|
17
27
|
* Formats date categories in the tooltip, data table, and summary.
|
|
18
28
|
* Time axis ticks use `ChartAxis` `formatTick` (it receives the timestamp).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useChartCartesian as e } from "../../../Utils/Charts/useChartCartesian.js";
|
|
2
|
+
import { mountEchartsBar as t } from "@bridge-ui/core/Integrations/Echarts";
|
|
3
3
|
//#region src/Components/ChartBar/composables/useChartBar.ts
|
|
4
4
|
function n(n, r) {
|
|
5
|
-
return
|
|
5
|
+
return e(n, {
|
|
6
6
|
libDefaults: r,
|
|
7
7
|
kind: "bar",
|
|
8
|
-
mount:
|
|
8
|
+
mount: t,
|
|
9
9
|
componentName: "ChartBar"
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { ChartBarOwnProps, ChartBarProps, } from './chartBar.types';
|
|
2
2
|
export { default as ChartBar } from './ChartBar.vue';
|
|
3
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';
|
|
4
|
+
export { useChartContext, type ChartCategoryColors, type ChartClasses, type ChartColorOverrides, type ChartColorValue, type ChartContextValue, type ChartCustomProps, type ChartSizeOverrides, type ChartSlots, } from '../../Utils/Charts';
|
package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -8,6 +8,8 @@ var i = {
|
|
|
8
8
|
__name: "ChartBarSeries",
|
|
9
9
|
props: {
|
|
10
10
|
color: {},
|
|
11
|
+
colorBy: {},
|
|
12
|
+
colorRanges: {},
|
|
11
13
|
data: {},
|
|
12
14
|
labels: {
|
|
13
15
|
type: Boolean,
|
|
@@ -15,7 +17,8 @@ var i = {
|
|
|
15
17
|
},
|
|
16
18
|
name: {},
|
|
17
19
|
reference: {},
|
|
18
|
-
stack: {}
|
|
20
|
+
stack: {},
|
|
21
|
+
tone: {}
|
|
19
22
|
},
|
|
20
23
|
setup(n) {
|
|
21
24
|
return e(n), (e, n) => (r(), t("span", i));
|