@bridge-ui/vue 0.19.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/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/composables/useChartBar.js +4 -4
- package/dist/Components/ChartFunnel/composables/useChartFunnel.js +10 -10
- package/dist/Components/ChartLine/composables/useChartLine.js +1 -1
- package/dist/Components/ChartPie/composables/useChartPie.js +10 -10
- package/dist/Components/ChartScatter/composables/useChartScatter.js +21 -21
- 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/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/index.d.ts +1 -1
- package/dist/index.js +175 -175
- 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 -23
- package/dist/Utils/Charts/echarts/cartesian.d.ts +0 -15
- package/dist/Utils/Charts/echarts/cartesian.js +0 -290
- 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 -20
- 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 -76
- 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 -161
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { chartRootBridgeKeys as e, useChartRoot as t } from "../../../Utils/Charts/useChartRoot.js";
|
|
2
2
|
import { useChartPart as n } from "../../../Utils/Charts/useChartPart.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { computed as r } from "vue";
|
|
4
|
+
import { DEFAULT_CHART_DONUT_THICKNESS as i, DEFAULT_CHART_MIN_ANGLE as a, getChartPiePercents as o, getChartPieSliceDefaults as s, getChartPieSummaryParams as c } from "@bridge-ui/core/Domain";
|
|
5
|
+
import { mountEchartsPie as l } from "@bridge-ui/core/Integrations/Echarts";
|
|
6
6
|
//#region src/Components/ChartPie/composables/useChartPie.ts
|
|
7
7
|
var u = [
|
|
8
8
|
...e,
|
|
@@ -39,9 +39,9 @@ function f(e, f) {
|
|
|
39
39
|
componentName: "ChartPie",
|
|
40
40
|
bridgeKeys: u,
|
|
41
41
|
registryKeys: d
|
|
42
|
-
}), { merged: m, locale: h, resolveMessage: g } = p, _ =
|
|
42
|
+
}), { merged: m, locale: h, resolveMessage: g } = p, _ = r(() => m.value.variant ?? "pie"), v = r(() => m.value.labels ?? !1);
|
|
43
43
|
function y(e) {
|
|
44
|
-
let t =
|
|
44
|
+
let t = s(_.value);
|
|
45
45
|
return {
|
|
46
46
|
...e,
|
|
47
47
|
labels: v.value,
|
|
@@ -49,13 +49,13 @@ function f(e, f) {
|
|
|
49
49
|
rose: m.value.rose ?? null,
|
|
50
50
|
labelPosition: m.value.labelPosition ?? "outside",
|
|
51
51
|
padAngle: m.value.padAngle ?? t.padAngle,
|
|
52
|
-
minAngle: m.value.minAngle ??
|
|
53
|
-
thickness: m.value.thickness ??
|
|
52
|
+
minAngle: m.value.minAngle ?? a,
|
|
53
|
+
thickness: m.value.thickness ?? i,
|
|
54
54
|
cornerRadius: m.value.cornerRadius ?? t.cornerRadius
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
function b(e) {
|
|
58
|
-
return g("Pie chart with {{count}} slices: {{items}}.",
|
|
58
|
+
return g("Pie chart with {{count}} slices: {{items}}.", c({
|
|
59
59
|
slices: e,
|
|
60
60
|
locale: h.value
|
|
61
61
|
}));
|
|
@@ -66,10 +66,10 @@ function f(e, f) {
|
|
|
66
66
|
buildOptions: y,
|
|
67
67
|
family: "pie",
|
|
68
68
|
positiveOnly: !0,
|
|
69
|
-
mount:
|
|
69
|
+
mount: l,
|
|
70
70
|
data: () => e.data,
|
|
71
71
|
labels: () => v.value,
|
|
72
|
-
percents:
|
|
72
|
+
percents: o,
|
|
73
73
|
maxSlices: () => e.maxSlices,
|
|
74
74
|
labelContent: () => e.labelContent
|
|
75
75
|
}),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useChartRegistry as e } from "../../../Utils/Charts/useChartRegistry.js";
|
|
2
2
|
import { chartRootBridgeKeys as t, toChartLegendItems as n, useChartColors as r, useChartContextValue as i, useChartFrame as a, useChartPlot as o, useChartRoot as s } from "../../../Utils/Charts/useChartRoot.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { computed as c } from "vue";
|
|
4
|
+
import { isNil as l } from "es-toolkit/compat";
|
|
5
|
+
import { DEFAULT_CHART_BUBBLE_SIZE as u, DEFAULT_CHART_SYMBOL_SIZE as d, getChartBubbleSizeDomain as f, getChartRangeColorItems as p, getChartScatterPoints as m, getChartScatterTable as h, getChartScatterTooltip as g, isChartScatterEmpty as _, resolveChartRangeColors as v } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { mountEchartsScatter as y } from "@bridge-ui/core/Integrations/Echarts";
|
|
7
7
|
//#region src/Components/ChartScatter/composables/useChartScatter.ts
|
|
8
8
|
var b = [
|
|
9
9
|
...t,
|
|
@@ -24,17 +24,17 @@ function S(t, S) {
|
|
|
24
24
|
componentName: "ChartScatter",
|
|
25
25
|
bridgeKeys: b,
|
|
26
26
|
registryKeys: x
|
|
27
|
-
}), w = e(), { merged: T, hidden: E, locale: D, resolveMessage: O } = C, k =
|
|
27
|
+
}), w = e(), { merged: T, hidden: E, locale: D, resolveMessage: O } = C, k = c(() => JSON.stringify(t.bubbleSize ?? T.value.bubbleSize ?? u)), A = c(() => JSON.parse(k.value)), j = r(C, () => [...w.entries.value, ...p(w.entries.value)]), M = c(() => w.entries.value.filter((e) => !E.value.includes(e.id)).map((e) => ({
|
|
28
28
|
...e,
|
|
29
29
|
color: j.value[e.id] ?? "",
|
|
30
|
-
colorRanges:
|
|
30
|
+
colorRanges: v({
|
|
31
31
|
seriesId: e.id,
|
|
32
32
|
colors: j.value,
|
|
33
33
|
ranges: e.colorRanges ?? []
|
|
34
34
|
})
|
|
35
|
-
}))), N =
|
|
35
|
+
}))), N = c(() => m(M.value)), P = c(() => {
|
|
36
36
|
let e = C.theme.value;
|
|
37
|
-
return
|
|
37
|
+
return l(e) ? null : {
|
|
38
38
|
theme: e,
|
|
39
39
|
points: N.value,
|
|
40
40
|
series: M.value,
|
|
@@ -44,21 +44,21 @@ function S(t, S) {
|
|
|
44
44
|
height: C.plotSize.value.height,
|
|
45
45
|
xAxis: { ...w.axes.value.x },
|
|
46
46
|
yAxis: { ...w.axes.value.y },
|
|
47
|
-
sizeDomain:
|
|
48
|
-
symbolSize: T.value.symbolSize ??
|
|
47
|
+
sizeDomain: f(M.value),
|
|
48
|
+
symbolSize: T.value.symbolSize ?? d
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
51
|
o(C, {
|
|
52
52
|
options: P,
|
|
53
|
-
mount:
|
|
53
|
+
mount: y
|
|
54
54
|
});
|
|
55
|
-
let F =
|
|
55
|
+
let F = c(() => ({
|
|
56
56
|
size: O("Size"),
|
|
57
57
|
x: w.axes.value.x?.label ?? "x",
|
|
58
58
|
y: w.axes.value.y?.label ?? "y"
|
|
59
|
-
})), I =
|
|
60
|
-
let e = C.active.value.index, t =
|
|
61
|
-
return
|
|
59
|
+
})), I = c(() => {
|
|
60
|
+
let e = C.active.value.index, t = l(e) ? void 0 : N.value[e], n = l(t) ? void 0 : M.value[t.seriesIndex];
|
|
61
|
+
return l(t) || l(n) ? null : g({
|
|
62
62
|
point: t,
|
|
63
63
|
series: n,
|
|
64
64
|
labels: {
|
|
@@ -68,31 +68,31 @@ function S(t, S) {
|
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
return {
|
|
71
|
-
frame: a(C,
|
|
71
|
+
frame: a(C, c(() => {
|
|
72
72
|
let e = w.entries.value;
|
|
73
73
|
return {
|
|
74
74
|
tooltip: I.value,
|
|
75
75
|
count: N.value.length,
|
|
76
|
-
isEmpty:
|
|
76
|
+
isEmpty: _(e),
|
|
77
77
|
summary: O("Scatter chart with {{count}} series ({{names}}) and {{points}} points.", {
|
|
78
78
|
count: e.length,
|
|
79
|
-
points:
|
|
79
|
+
points: m(e).length,
|
|
80
80
|
names: e.map((e) => e.name).join(", ")
|
|
81
81
|
}),
|
|
82
|
-
table:
|
|
82
|
+
table: h({
|
|
83
83
|
series: e,
|
|
84
84
|
locale: D.value,
|
|
85
85
|
headers: {
|
|
86
86
|
x: F.value.x,
|
|
87
87
|
y: F.value.y,
|
|
88
88
|
series: O("Series"),
|
|
89
|
-
size: e.find((e) => !
|
|
89
|
+
size: e.find((e) => !l(e.sizeName))?.sizeName ?? F.value.size
|
|
90
90
|
}
|
|
91
91
|
})
|
|
92
92
|
};
|
|
93
93
|
})),
|
|
94
94
|
merged: T,
|
|
95
|
-
context: i(C,
|
|
95
|
+
context: i(C, c(() => ({
|
|
96
96
|
tooltip: I.value,
|
|
97
97
|
setAxis: w.setAxis,
|
|
98
98
|
family: "scatter",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { FieldOverlayMode } from '@bridge-ui/core/Domain';
|
|
2
|
-
import { DataTableVisibilityItem } from './composables/useDataTable';
|
|
1
|
+
import { DataTableVisibilityItem, FieldOverlayMode } from '@bridge-ui/core/Domain';
|
|
3
2
|
type __VLS_Props = {
|
|
4
3
|
items: DataTableVisibilityItem[];
|
|
5
4
|
overlay?: FieldOverlayMode;
|
|
@@ -1,48 +1,12 @@
|
|
|
1
1
|
import { Ref, VNode, VNodeChild } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { DataTableCellView as CoreDataTableCellView, DataTableHeaderView as CoreDataTableHeaderView, DataTableColumnSearch, DataTableFilters, DataTablePaginationSlotProps, DataTablePerPageSlotProps, DataTableSelectedSlotProps, DataTableSorting, DataTableVisibilityItem, PaginationCursor } from '@bridge-ui/core/Domain';
|
|
3
3
|
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
4
4
|
import { DataTableColumn, DataTableOwnProps, DataTableProps } from '../dataTable.types';
|
|
5
5
|
type DataTableLibDefaults = LibDefaultsShape<DataTableOwnProps<unknown>, "full" | "size" | "loading" | "rounded" | "striped" | "variant" | "hoverable" | "stickyHeader" | "filterOverlay" | "selectionMode" | "columnsOverlay" | "loadingVariant">;
|
|
6
6
|
type DataTableMerged<T> = MergeLibDefaults<DataTableOwnProps<T>, DataTableLibDefaults>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
classes?: DataTableColumn<unknown>["classes"];
|
|
11
|
-
ellipsis: boolean;
|
|
12
|
-
filterable: boolean;
|
|
13
|
-
filterActive: boolean;
|
|
14
|
-
filterMultiple: boolean;
|
|
15
|
-
filterOptions: DataTableFilterOption[];
|
|
16
|
-
filterValues: string[];
|
|
17
|
-
header: VNodeChild;
|
|
18
|
-
hideable: boolean;
|
|
19
|
-
id: string;
|
|
20
|
-
isExpand: boolean;
|
|
21
|
-
isSelection: boolean;
|
|
22
|
-
searchable: boolean;
|
|
23
|
-
searchQuery: string;
|
|
24
|
-
sortable: boolean;
|
|
25
|
-
sortIcon: ReturnType<typeof getDataTableSortIcon>;
|
|
26
|
-
sticky?: DataTableStickyEdge;
|
|
27
|
-
stickyEdge: boolean;
|
|
28
|
-
stickyStyle?: DataTableStickyInset["style"];
|
|
29
|
-
width?: number | string;
|
|
30
|
-
};
|
|
31
|
-
export type DataTableCellView = {
|
|
32
|
-
align?: DataTableColumn<unknown>["align"];
|
|
33
|
-
classes?: DataTableColumn<unknown>["classes"];
|
|
34
|
-
content: VNodeChild;
|
|
35
|
-
ellipsis: boolean;
|
|
36
|
-
id: string;
|
|
37
|
-
isExpand: boolean;
|
|
38
|
-
isSelection: boolean;
|
|
39
|
-
sticky?: DataTableStickyEdge;
|
|
40
|
-
stickyEdge: boolean;
|
|
41
|
-
stickyStyle?: DataTableStickyInset["style"];
|
|
42
|
-
tooltip?: string;
|
|
43
|
-
value?: unknown;
|
|
44
|
-
width?: number | string;
|
|
45
|
-
};
|
|
7
|
+
type DataTableAlign = NonNullable<DataTableColumn<unknown>["align"]>;
|
|
8
|
+
export type DataTableHeaderView = CoreDataTableHeaderView<VNodeChild, DataTableAlign>;
|
|
9
|
+
export type DataTableCellView = CoreDataTableCellView<VNodeChild, DataTableAlign>;
|
|
46
10
|
export type DataTableRowView<T = unknown> = {
|
|
47
11
|
cells: DataTableCellView[];
|
|
48
12
|
expanded: boolean;
|
|
@@ -50,12 +14,6 @@ export type DataTableRowView<T = unknown> = {
|
|
|
50
14
|
original: T;
|
|
51
15
|
selected: boolean;
|
|
52
16
|
};
|
|
53
|
-
export type DataTableVisibilityItem = {
|
|
54
|
-
hidden: boolean;
|
|
55
|
-
hideable: boolean;
|
|
56
|
-
id: string;
|
|
57
|
-
label: string;
|
|
58
|
-
};
|
|
59
17
|
export type DataTableModels = {
|
|
60
18
|
columnSearch: Ref<undefined | DataTableColumnSearch>;
|
|
61
19
|
cursor?: Ref<undefined | PaginationCursor>;
|
|
@@ -488,15 +446,7 @@ export declare function useDataTable<T extends Record<string, unknown>>(props: D
|
|
|
488
446
|
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
489
447
|
showSearch: import('vue').ComputedRef<boolean>;
|
|
490
448
|
getHeadBind: (header: DataTableHeaderView) => import('@bridge-ui/core/Utils').MergePartBind<{
|
|
491
|
-
style:
|
|
492
|
-
top?: number | undefined;
|
|
493
|
-
position?: "sticky" | undefined;
|
|
494
|
-
zIndex?: number | undefined;
|
|
495
|
-
left?: number;
|
|
496
|
-
right?: number;
|
|
497
|
-
width?: string | undefined;
|
|
498
|
-
maxWidth?: string | undefined;
|
|
499
|
-
};
|
|
449
|
+
style: import('@bridge-ui/core/Domain').DataTableColumnLayoutStyle;
|
|
500
450
|
"aria-sort": import('@bridge-ui/core/Domain').DataTableAriaSort | undefined;
|
|
501
451
|
class: string;
|
|
502
452
|
}, "class", import('vue').HTMLAttributes | undefined, {}>;
|
|
@@ -509,15 +459,7 @@ export declare function useDataTable<T extends Record<string, unknown>>(props: D
|
|
|
509
459
|
class: string;
|
|
510
460
|
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
511
461
|
getCellBind: (cell: DataTableCellView) => import('@bridge-ui/core/Utils').MergePartBind<{
|
|
512
|
-
style:
|
|
513
|
-
top?: number | undefined;
|
|
514
|
-
position?: "sticky" | undefined;
|
|
515
|
-
zIndex?: number | undefined;
|
|
516
|
-
left?: number;
|
|
517
|
-
right?: number;
|
|
518
|
-
width?: string | undefined;
|
|
519
|
-
maxWidth?: string | undefined;
|
|
520
|
-
};
|
|
462
|
+
style: import('@bridge-ui/core/Domain').DataTableColumnLayoutStyle;
|
|
521
463
|
class: string;
|
|
522
464
|
}, "class", import('vue').HTMLAttributes | undefined, {}>;
|
|
523
465
|
columnCount: import('vue').ComputedRef<number>;
|
|
@@ -530,8 +472,8 @@ export declare function useDataTable<T extends Record<string, unknown>>(props: D
|
|
|
530
472
|
class: string;
|
|
531
473
|
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
532
474
|
showSelected: import('vue').ComputedRef<boolean>;
|
|
533
|
-
getHeadAlign: (header: DataTableHeaderView) =>
|
|
534
|
-
getCellAlign: (cell: DataTableCellView) =>
|
|
475
|
+
getHeadAlign: (header: DataTableHeaderView) => "end" | "start" | "center";
|
|
476
|
+
getCellAlign: (cell: DataTableCellView) => "end" | "start" | "center";
|
|
535
477
|
onTogglePage: (selectAll: boolean) => void;
|
|
536
478
|
onToggleSort: (columnId: string) => void;
|
|
537
479
|
summaryCells: import('vue').ComputedRef<DataTableCellView[] | null>;
|