@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.
Files changed (45) hide show
  1. package/dist/Components/Autocomplete/composables/useAutocomplete.js +257 -265
  2. package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
  3. package/dist/Components/Calendar/composables/useCalendar.js +192 -187
  4. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
  5. package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
  6. package/dist/Components/CalendarRange/composables/useCalendarRange.js +243 -238
  7. package/dist/Components/ChartBar/composables/useChartBar.js +4 -4
  8. package/dist/Components/ChartFunnel/composables/useChartFunnel.js +10 -10
  9. package/dist/Components/ChartLine/composables/useChartLine.js +1 -1
  10. package/dist/Components/ChartPie/composables/useChartPie.js +10 -10
  11. package/dist/Components/ChartScatter/composables/useChartScatter.js +21 -21
  12. package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +1 -2
  13. package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -66
  14. package/dist/Components/DataTable/composables/useDataTable.js +267 -349
  15. package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +1 -2
  16. package/dist/Components/ListItem/composables/useListItem.js +29 -30
  17. package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +0 -5
  18. package/dist/Components/Listbox/composables/useListboxNavigation.js +23 -50
  19. package/dist/Components/Listbox/index.d.ts +1 -1
  20. package/dist/Components/Listbox/index.js +5 -5
  21. package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
  22. package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +31 -31
  23. package/dist/Components/Select/composables/useSelect.js +201 -211
  24. package/dist/Components/Slider/composables/useSlider.js +93 -122
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +175 -175
  27. package/package.json +2 -2
  28. package/dist/Components/RichTextEditor/tiptapEditor.d.ts +0 -111
  29. package/dist/Components/RichTextEditor/tiptapEditor.js +0 -121
  30. package/dist/Utils/Charts/echarts/bar.d.ts +0 -6
  31. package/dist/Utils/Charts/echarts/bar.js +0 -23
  32. package/dist/Utils/Charts/echarts/cartesian.d.ts +0 -15
  33. package/dist/Utils/Charts/echarts/cartesian.js +0 -290
  34. package/dist/Utils/Charts/echarts/funnel.d.ts +0 -15
  35. package/dist/Utils/Charts/echarts/funnel.js +0 -79
  36. package/dist/Utils/Charts/echarts/line.d.ts +0 -5
  37. package/dist/Utils/Charts/echarts/line.js +0 -20
  38. package/dist/Utils/Charts/echarts/part.d.ts +0 -19
  39. package/dist/Utils/Charts/echarts/part.js +0 -45
  40. package/dist/Utils/Charts/echarts/pie.d.ts +0 -14
  41. package/dist/Utils/Charts/echarts/pie.js +0 -76
  42. package/dist/Utils/Charts/echarts/plot.d.ts +0 -44
  43. package/dist/Utils/Charts/echarts/plot.js +0 -52
  44. package/dist/Utils/Charts/echarts/scatter.d.ts +0 -14
  45. 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 { mountEchartsPie as r } from "../../../Utils/Charts/echarts/pie.js";
4
- import { computed as i } from "vue";
5
- import { DEFAULT_CHART_DONUT_THICKNESS as a, DEFAULT_CHART_MIN_ANGLE as o, getChartPiePercents as s, getChartPieSliceDefaults as c, getChartPieSummaryParams as l } from "@bridge-ui/core/Domain";
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, _ = i(() => m.value.variant ?? "pie"), v = i(() => m.value.labels ?? !1);
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 = c(_.value);
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 ?? o,
53
- thickness: m.value.thickness ?? a,
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}}.", l({
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: r,
69
+ mount: l,
70
70
  data: () => e.data,
71
71
  labels: () => v.value,
72
- percents: s,
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 { mountEchartsScatter as c } from "../../../Utils/Charts/echarts/scatter.js";
4
- import { computed as l } from "vue";
5
- import { isNil as u } from "es-toolkit/compat";
6
- import { DEFAULT_CHART_BUBBLE_SIZE as d, DEFAULT_CHART_SYMBOL_SIZE as f, getChartBubbleSizeDomain as p, getChartRangeColorItems as m, getChartScatterPoints as h, getChartScatterTable as g, getChartScatterTooltip as _, isChartScatterEmpty as v, resolveChartRangeColors as y } from "@bridge-ui/core/Domain";
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 = l(() => JSON.stringify(t.bubbleSize ?? T.value.bubbleSize ?? d)), A = l(() => JSON.parse(k.value)), j = r(C, () => [...w.entries.value, ...m(w.entries.value)]), M = l(() => w.entries.value.filter((e) => !E.value.includes(e.id)).map((e) => ({
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: y({
30
+ colorRanges: v({
31
31
  seriesId: e.id,
32
32
  colors: j.value,
33
33
  ranges: e.colorRanges ?? []
34
34
  })
35
- }))), N = l(() => h(M.value)), P = l(() => {
35
+ }))), N = c(() => m(M.value)), P = c(() => {
36
36
  let e = C.theme.value;
37
- return u(e) ? null : {
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: p(M.value),
48
- symbolSize: T.value.symbolSize ?? f
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: c
53
+ mount: y
54
54
  });
55
- let F = l(() => ({
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 = l(() => {
60
- let e = C.active.value.index, t = u(e) ? void 0 : N.value[e], n = u(t) ? void 0 : M.value[t.seriesIndex];
61
- return u(t) || u(n) ? null : _({
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, l(() => {
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: v(e),
76
+ isEmpty: _(e),
77
77
  summary: O("Scatter chart with {{count}} series ({{names}}) and {{points}} points.", {
78
78
  count: e.length,
79
- points: h(e).length,
79
+ points: m(e).length,
80
80
  names: e.map((e) => e.name).join(", ")
81
81
  }),
82
- table: g({
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) => !u(e.sizeName))?.sizeName ?? F.value.size
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, l(() => ({
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 { getDataTableAriaSort, getDataTableSortIcon, DataTableColumnSearch, DataTableFilterOption, DataTableFilters, DataTablePaginationSlotProps, DataTablePerPageSlotProps, DataTableSelectedSlotProps, DataTableSorting, DataTableStickyEdge, DataTableStickyInset, PaginationCursor } from '@bridge-ui/core/Domain';
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
- export type DataTableHeaderView = {
8
- align?: DataTableColumn<unknown>["align"];
9
- ariaSort: ReturnType<typeof getDataTableAriaSort>;
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) => keyof import('@bridge-ui/core/Tokens').TableAlign;
534
- getCellAlign: (cell: DataTableCellView) => keyof import('@bridge-ui/core/Tokens').TableAlign;
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>;