@oneflowui/ui 0.8.1 → 0.8.3

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 (107) hide show
  1. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  2. package/dist/components/Dashboard/charts/BarChart.vue2.js +9 -9
  3. package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
  5. package/dist/components/Dashboard/charts/PieChart.vue2.js +3 -3
  6. package/dist/components/Dashboard/charts/TableChart.vue.js +2 -2
  7. package/dist/components/Dashboard/index.vue.js +2 -2
  8. package/dist/components/base/InfoCard.vue.js +1 -1
  9. package/dist/components/base/InfoCard.vue2.js +40 -40
  10. package/dist/components/base/StatisticCard.vue.js +3 -3
  11. package/dist/components/base/StatusSummary.vue.js +1 -1
  12. package/dist/components/base/StatusSummary.vue2.js +5 -5
  13. package/dist/components/database/DatabaseDetailPresenter.vue.d.ts +41 -0
  14. package/dist/components/database/DatabaseDetailPresenter.vue.js +76 -0
  15. package/dist/components/database/DatabaseDetailPresenter.vue2.js +4 -0
  16. package/dist/components/database/DatabaseDetailWorkspace.vue.d.ts +37 -0
  17. package/dist/components/database/DatabaseDetailWorkspace.vue.js +7 -0
  18. package/dist/components/database/DatabaseDetailWorkspace.vue2.js +103 -0
  19. package/dist/components/database/DatabaseView.vue.d.ts +13 -76
  20. package/dist/components/database/DatabaseView.vue.js +2 -2
  21. package/dist/components/database/DatabaseView.vue2.js +322 -921
  22. package/dist/components/database/DatabaseViewContent.vue.d.ts +74 -0
  23. package/dist/components/database/DatabaseViewContent.vue.js +79 -0
  24. package/dist/components/database/DatabaseViewContent.vue2.js +4 -0
  25. package/dist/components/database/DatabaseViewDetailHost.vue.d.ts +43 -0
  26. package/dist/components/database/DatabaseViewDetailHost.vue.js +59 -0
  27. package/dist/components/database/DatabaseViewDetailHost.vue2.js +4 -0
  28. package/dist/components/database/DatabaseViewShell.vue.d.ts +35 -0
  29. package/dist/components/database/DatabaseViewShell.vue.js +7 -0
  30. package/dist/components/database/DatabaseViewShell.vue2.js +71 -0
  31. package/dist/components/database/DatabaseViewToolbar.vue.d.ts +77 -0
  32. package/dist/components/database/DatabaseViewToolbar.vue.js +62 -0
  33. package/dist/components/database/DatabaseViewToolbar.vue2.js +4 -0
  34. package/dist/components/database/databaseViewUtils.d.ts +91 -0
  35. package/dist/components/database/databaseViewUtils.js +266 -0
  36. package/dist/components/database/index.d.ts +1 -1
  37. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -2
  38. package/dist/components/layout/AppLayout.vue.js +1 -1
  39. package/dist/components/layout/Navbar.vue.js +1 -1
  40. package/dist/components/layout/Sidebar.vue.js +2 -2
  41. package/dist/components/layout/StatusBar.vue.js +2 -2
  42. package/dist/components/overlay/Dialog.vue.d.ts +1 -1
  43. package/dist/components/table/ColumnHeaderMenu.vue.js +3 -3
  44. package/dist/components/table/DataTable.vue.d.ts +6 -17
  45. package/dist/components/table/DataTable.vue.js +2 -2
  46. package/dist/components/table/DataTable.vue2.js +781 -872
  47. package/dist/components/table/DataTableDesktopFixedRegion.vue.d.ts +56 -0
  48. package/dist/components/table/DataTableDesktopFixedRegion.vue.js +7 -0
  49. package/dist/components/table/DataTableDesktopFixedRegion.vue2.js +67 -0
  50. package/dist/components/table/DataTableDesktopFrame.vue.d.ts +127 -0
  51. package/dist/components/table/DataTableDesktopFrame.vue.js +7 -0
  52. package/dist/components/table/DataTableDesktopFrame.vue2.js +196 -0
  53. package/dist/components/table/DataTableDesktopScrollRegion.vue.d.ts +55 -0
  54. package/dist/components/table/DataTableDesktopScrollRegion.vue.js +7 -0
  55. package/dist/components/table/DataTableDesktopScrollRegion.vue2.js +66 -0
  56. package/dist/components/table/DataTableDesktopStandardRegion.vue.d.ts +54 -0
  57. package/dist/components/table/DataTableDesktopStandardRegion.vue.js +7 -0
  58. package/dist/components/table/DataTableDesktopStandardRegion.vue2.js +65 -0
  59. package/dist/components/table/DataTableDraftToolbar.vue.d.ts +11 -0
  60. package/dist/components/table/DataTableDraftToolbar.vue.js +7 -0
  61. package/dist/components/table/DataTableDraftToolbar.vue2.js +25 -0
  62. package/dist/components/table/DataTableMobilePanel.vue.d.ts +79 -0
  63. package/dist/components/table/DataTableMobilePanel.vue.js +60 -0
  64. package/dist/components/table/DataTableMobilePanel.vue2.js +4 -0
  65. package/dist/components/table/DataTableSelectionBar.vue.d.ts +11 -0
  66. package/dist/components/table/DataTableSelectionBar.vue.js +7 -0
  67. package/dist/components/table/DataTableSelectionBar.vue2.js +33 -0
  68. package/dist/components/table/DetailSheet.vue.js +1 -1
  69. package/dist/components/table/DetailSheet.vue2.js +160 -187
  70. package/dist/components/table/FieldTypePicker.vue.js +3 -3
  71. package/dist/components/table/MobileListView.vue.js +1 -1
  72. package/dist/components/table/TableColumnManager.vue.js +3 -3
  73. package/dist/components/table/TableDataRow.vue.js +4 -4
  74. package/dist/components/table/TableFilterPanel.vue.js +1 -1
  75. package/dist/components/table/TableGroupRow.vue.js +2 -2
  76. package/dist/components/table/TableHeaderRow.vue.js +3 -3
  77. package/dist/components/table/TableToolbar.vue.js +2 -2
  78. package/dist/components/table/TableToolbar.vue2.js +126 -138
  79. package/dist/components/table/dataTableUtils.d.ts +26 -0
  80. package/dist/components/table/dataTableUtils.js +60 -0
  81. package/dist/composables/databaseDetailWorkspaceUtils.d.ts +59 -0
  82. package/dist/composables/databaseDetailWorkspaceUtils.js +160 -0
  83. package/dist/composables/index.d.ts +5 -0
  84. package/dist/composables/useDataTableDetailSheet.d.ts +47 -0
  85. package/dist/composables/useDataTableDetailSheet.js +58 -0
  86. package/dist/composables/useDataTableLayout.d.ts +16 -0
  87. package/dist/composables/useDataTableLayout.js +38 -0
  88. package/dist/composables/useDataTableSelection.d.ts +41 -0
  89. package/dist/composables/useDataTableSelection.js +73 -0
  90. package/dist/composables/useDatabaseDetailWorkspace.d.ts +67 -0
  91. package/dist/composables/useDatabaseDetailWorkspace.js +150 -0
  92. package/dist/composables/useDatabaseView.d.ts +3 -137
  93. package/dist/composables/useDatabaseWorkspace.d.ts +31 -0
  94. package/dist/composables/useDatabaseWorkspace.js +89 -0
  95. package/dist/composables/useTableToolbarPanels.d.ts +19 -0
  96. package/dist/composables/useTableToolbarPanels.js +53 -0
  97. package/dist/contracts/database.d.ts +252 -0
  98. package/dist/index.d.ts +6 -0
  99. package/dist/index.js +261 -248
  100. package/dist/plugin.d.ts +2 -0
  101. package/dist/plugin.js +10 -261
  102. package/dist/registry/plugin-components.d.ts +291 -0
  103. package/dist/registry/plugin-components.js +114 -0
  104. package/dist/style.css +1 -1
  105. package/dist/types/data-table.d.ts +27 -0
  106. package/dist/types/data-table.js +29 -0
  107. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./BarChart.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7cbf158c"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a871c5bc"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as d, ref as c, onMounted as u, onUnmounted as f, watch as p, openBlock as m, createElementBlock as x, createElementVNode as y } from "vue";
2
- import * as h from "echarts/core";
1
+ import { defineComponent as d, ref as c, onMounted as f, onUnmounted as u, watch as p, openBlock as m, createElementBlock as x, createElementVNode as y } from "vue";
2
+ import * as v from "echarts/core";
3
3
  import "echarts/charts";
4
4
  import "echarts/components";
5
5
  import "echarts/renderers";
6
- const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
6
+ const h = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
7
7
  __name: "BarChart",
8
8
  props: {
9
9
  title: { default: "" },
@@ -22,7 +22,7 @@ const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
22
22
  }
23
23
  const l = () => {
24
24
  if (!a.value) return;
25
- t || (t = h.init(a.value));
25
+ t || (t = v.init(a.value));
26
26
  const r = e.colors.map(o);
27
27
  t.setOption({
28
28
  color: r,
@@ -41,12 +41,12 @@ const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
41
41
  type: "category",
42
42
  data: e.xAxisData,
43
43
  axisLabel: { color: o("var(--of-text-tertiary)") },
44
- axisLine: { lineStyle: { color: o("var(--of-border-subtle)") } }
44
+ axisLine: { lineStyle: { color: o("var(--of-border-workspace)") } }
45
45
  },
46
46
  yAxis: {
47
47
  type: "value",
48
48
  axisLabel: { color: o("var(--of-text-tertiary)") },
49
- splitLine: { lineStyle: { color: o("var(--of-border-subtle)") } }
49
+ splitLine: { lineStyle: { color: o("var(--of-border-divider)") } }
50
50
  },
51
51
  series: [
52
52
  {
@@ -59,13 +59,13 @@ const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
59
59
  ]
60
60
  });
61
61
  };
62
- return u(() => {
62
+ return f(() => {
63
63
  l(), a.value && (i = new ResizeObserver(() => t == null ? void 0 : t.resize()), i.observe(a.value));
64
- }), f(() => {
64
+ }), u(() => {
65
65
  i == null || i.disconnect(), t == null || t.dispose();
66
66
  }), p(() => [e.title, e.xAxisData, e.seriesName, e.data, e.colors], l, {
67
67
  deep: !0
68
- }), (r, s) => (m(), x("div", v, [
68
+ }), (r, s) => (m(), x("div", h, [
69
69
  y("div", {
70
70
  ref_key: "chartRef",
71
71
  ref: a,
@@ -1,7 +1,7 @@
1
1
  import o from "./NumberCard.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bf4a8d8b"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d92675b9"]]);
5
5
  export {
6
- f as default
6
+ p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./PieChart.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e78b0c6"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bae87643"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -3,7 +3,7 @@ import * as g from "echarts/core";
3
3
  import "echarts/charts";
4
4
  import "echarts/components";
5
5
  import "echarts/renderers";
6
- const y = { class: "of-dashboard-chart" }, C = /* @__PURE__ */ d({
6
+ const y = { class: "of-dashboard-chart" }, k = /* @__PURE__ */ d({
7
7
  __name: "PieChart",
8
8
  props: {
9
9
  title: { default: "" },
@@ -55,7 +55,7 @@ const y = { class: "of-dashboard-chart" }, C = /* @__PURE__ */ d({
55
55
  data: e.data,
56
56
  label: { formatter: "{b}: {d}%" },
57
57
  itemStyle: {
58
- borderColor: n("var(--of-surface-elevated)"),
58
+ borderColor: n("var(--of-surface-workspace-raised)"),
59
59
  borderWidth: 2
60
60
  }
61
61
  }
@@ -78,5 +78,5 @@ const y = { class: "of-dashboard-chart" }, C = /* @__PURE__ */ d({
78
78
  }
79
79
  });
80
80
  export {
81
- C as default
81
+ k as default
82
82
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableChart.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6b6fb763"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8db5c8d5"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eff3b1be"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6517a791"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./InfoCard.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3d068732"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-920595cb"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as E, useCssVars as L, computed as y, openBlock as o, createElementBlock as a, mergeProps as B, Fragment as l, renderSlot as c, createCommentVNode as n, createElementVNode as s, toDisplayString as i, normalizeStyle as u, renderList as P } from "vue";
2
- const w = {
1
+ import { defineComponent as w, useCssVars as E, computed as y, openBlock as o, createElementBlock as a, mergeProps as L, Fragment as l, renderSlot as s, createCommentVNode as n, createElementVNode as i, toDisplayString as c, normalizeStyle as u, renderList as B } from "vue";
2
+ const P = {
3
3
  key: 0,
4
4
  class: "of-info-card__icon-area"
5
5
  }, A = { class: "of-info-card__body" }, T = { class: "of-info-card__title" }, V = { class: "of-info-card__footer" }, D = {
@@ -23,7 +23,7 @@ const w = {
23
23
  }, j = {
24
24
  key: 1,
25
25
  class: "of-info-card__actions"
26
- }, G = /* @__PURE__ */ E({
26
+ }, G = /* @__PURE__ */ w({
27
27
  name: "InfoCard",
28
28
  inheritAttrs: !1,
29
29
  __name: "InfoCard",
@@ -44,18 +44,18 @@ const w = {
44
44
  typeColor: { default: void 0 }
45
45
  },
46
46
  emits: ["click"],
47
- setup(t, { emit: g }) {
48
- L((e) => ({
49
- v36da208e: e.unread ? "var(--of-surface-selected)" : "var(--of-surface-elevated)"
47
+ setup(t, { emit: k }) {
48
+ E((e) => ({
49
+ v2baa4b58: e.unread ? "var(--of-surface-selected)" : "var(--of-surface-card)"
50
50
  }));
51
- const r = t, h = g, m = {
51
+ const r = t, g = k, m = {
52
52
  模板: "var(--of-accent-default)",
53
53
  template: "var(--of-accent-default)",
54
54
  会话: "var(--of-text-strong)",
55
55
  session: "var(--of-text-strong)"
56
- }, k = y(() => r.variant === "memo" ? r.importance === "high" ? "var(--of-border-strong)" : r.borderColor ?? "var(--of-accent-default)" : r.variant === "history" ? r.typeColor ? r.typeColor : r.type && m[r.type] ? m[r.type] : r.borderColor ?? "var(--of-accent-default)" : "transparent"), _ = y(() => {
56
+ }, h = y(() => r.variant === "memo" ? r.importance === "high" ? "var(--of-border-strong)" : r.borderColor ?? "var(--of-accent-default)" : r.variant === "history" ? r.typeColor ? r.typeColor : r.type && m[r.type] ? m[r.type] : r.borderColor ?? "var(--of-accent-default)" : "transparent"), _ = y(() => {
57
57
  const e = {
58
- "--of-ic-border": k.value
58
+ "--of-ic-border": h.value
59
59
  };
60
60
  return r.variant === "notify" && (e["--of-ic-unread-dot"] = r.unread ? "var(--of-accent-default)" : "var(--of-text-tertiary)"), e;
61
61
  }), v = y(
@@ -68,12 +68,12 @@ const w = {
68
68
  {
69
69
  bg: "var(--of-surface-muted)",
70
70
  color: "var(--of-accent-default)",
71
- border: "var(--of-border-subtle)"
71
+ border: "var(--of-border-workspace)"
72
72
  },
73
73
  {
74
74
  bg: "var(--of-surface-panel)",
75
75
  color: "var(--of-text-strong)",
76
- border: "var(--of-border-subtle)"
76
+ border: "var(--of-border-workspace)"
77
77
  },
78
78
  {
79
79
  bg: "var(--of-surface-selected)",
@@ -83,12 +83,12 @@ const w = {
83
83
  {
84
84
  bg: "var(--of-surface-panel)",
85
85
  color: "var(--of-text-secondary)",
86
- border: "var(--of-border-subtle)"
86
+ border: "var(--of-border-workspace)"
87
87
  },
88
88
  {
89
89
  bg: "var(--of-surface-muted)",
90
90
  color: "var(--of-text-tertiary)",
91
- border: "var(--of-border-subtle)"
91
+ border: "var(--of-border-workspace)"
92
92
  }
93
93
  ], d = f[e % f.length];
94
94
  return {
@@ -98,12 +98,12 @@ const w = {
98
98
  };
99
99
  }
100
100
  function b(e) {
101
- h("click", e);
101
+ g("click", e);
102
102
  }
103
103
  function $(e) {
104
104
  e.key !== "Enter" && e.key !== " " || (e.preventDefault(), b(new MouseEvent("click")));
105
105
  }
106
- return (e, f) => (o(), a("div", B({
106
+ return (e, f) => (o(), a("div", L({
107
107
  class: ["of-info-card", `of-info-card--${t.variant}`],
108
108
  style: _.value,
109
109
  role: "button",
@@ -113,58 +113,58 @@ const w = {
113
113
  onKeydown: $
114
114
  }), [
115
115
  t.variant === "memo" ? (o(), a(l, { key: 0 }, [
116
- e.$slots.icon ? (o(), a("div", w, [
117
- c(e.$slots, "icon", {}, void 0, !0)
116
+ e.$slots.icon ? (o(), a("div", P, [
117
+ s(e.$slots, "icon", {}, void 0, !0)
118
118
  ])) : n("", !0),
119
- s("div", A, [
120
- s("div", T, i(t.title), 1),
119
+ i("div", A, [
120
+ i("div", T, c(t.title), 1),
121
121
  t.content ? (o(), a("div", {
122
122
  key: 0,
123
123
  class: "of-info-card__content of-info-card__content--clamp",
124
124
  style: u(v.value)
125
- }, i(t.content), 5)) : n("", !0),
126
- s("div", V, [
127
- t.tags && t.tags.length ? (o(!0), a(l, { key: 0 }, P(t.tags, (d, S) => (o(), a("span", {
125
+ }, c(t.content), 5)) : n("", !0),
126
+ i("div", V, [
127
+ t.tags && t.tags.length ? (o(!0), a(l, { key: 0 }, B(t.tags, (d, S) => (o(), a("span", {
128
128
  key: d,
129
129
  class: "of-info-card__tag",
130
130
  style: u(C(S))
131
- }, i(d), 5))), 128)) : n("", !0),
132
- t.author ? (o(), a("span", D, i(t.author), 1)) : n("", !0),
133
- t.date ? (o(), a("span", I, i(t.date), 1)) : n("", !0),
134
- c(e.$slots, "footer", {}, void 0, !0)
131
+ }, c(d), 5))), 128)) : n("", !0),
132
+ t.author ? (o(), a("span", D, c(t.author), 1)) : n("", !0),
133
+ t.date ? (o(), a("span", I, c(t.date), 1)) : n("", !0),
134
+ s(e.$slots, "footer", {}, void 0, !0)
135
135
  ])
136
136
  ])
137
137
  ], 64)) : t.variant === "notify" ? (o(), a(l, { key: 1 }, [
138
- f[0] || (f[0] = s("span", { class: "of-info-card__dot" }, null, -1)),
139
- s("div", K, [
140
- s("div", M, i(t.title), 1),
138
+ f[0] || (f[0] = i("span", { class: "of-info-card__dot" }, null, -1)),
139
+ i("div", K, [
140
+ i("div", M, c(t.title), 1),
141
141
  t.content ? (o(), a("div", {
142
142
  key: 0,
143
143
  class: "of-info-card__content of-info-card__content--clamp",
144
144
  style: u(v.value)
145
- }, i(t.content), 5)) : n("", !0),
146
- t.meta ? (o(), a("div", N, i(t.meta), 1)) : n("", !0),
147
- c(e.$slots, "footer", {}, void 0, !0)
145
+ }, c(t.content), 5)) : n("", !0),
146
+ t.meta ? (o(), a("div", N, c(t.meta), 1)) : n("", !0),
147
+ s(e.$slots, "footer", {}, void 0, !0)
148
148
  ]),
149
149
  e.$slots.actions ? (o(), a("div", O, [
150
- c(e.$slots, "actions", {}, void 0, !0)
150
+ s(e.$slots, "actions", {}, void 0, !0)
151
151
  ])) : n("", !0)
152
152
  ], 64)) : t.variant === "history" ? (o(), a(l, { key: 2 }, [
153
153
  e.$slots.icon ? (o(), a("div", z, [
154
- c(e.$slots, "icon", {}, void 0, !0)
154
+ s(e.$slots, "icon", {}, void 0, !0)
155
155
  ])) : n("", !0),
156
- s("div", F, [
157
- s("div", R, i(t.title), 1),
158
- t.subtitle ? (o(), a("div", Y, i(t.subtitle), 1)) : n("", !0),
156
+ i("div", F, [
157
+ i("div", R, c(t.title), 1),
158
+ t.subtitle ? (o(), a("div", Y, c(t.subtitle), 1)) : n("", !0),
159
159
  t.content ? (o(), a("div", {
160
160
  key: 1,
161
161
  class: "of-info-card__content of-info-card__content--clamp",
162
162
  style: u(v.value)
163
- }, i(t.content), 5)) : n("", !0),
164
- c(e.$slots, "footer", {}, void 0, !0)
163
+ }, c(t.content), 5)) : n("", !0),
164
+ s(e.$slots, "footer", {}, void 0, !0)
165
165
  ]),
166
166
  e.$slots.actions ? (o(), a("div", j, [
167
- c(e.$slots, "actions", {}, void 0, !0)
167
+ s(e.$slots, "actions", {}, void 0, !0)
168
168
  ])) : n("", !0)
169
169
  ], 64)) : n("", !0)
170
170
  ], 16));
@@ -1,7 +1,7 @@
1
1
  import t from "./StatisticCard.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-5de633aa"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-cfec8086"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./StatusSummary.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-ac111d85"]]);
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-23b96e2c"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, computed as i, openBlock as s, createElementBlock as a, mergeProps as g, Fragment as c, renderList as S, createCommentVNode as f, createElementVNode as r, normalizeStyle as n, toDisplayString as d, renderSlot as v } from "vue";
1
+ import { defineComponent as _, computed as c, openBlock as s, createElementBlock as a, mergeProps as g, Fragment as i, renderList as S, createCommentVNode as f, createElementVNode as r, normalizeStyle as n, toDisplayString as d, renderSlot as v } from "vue";
2
2
  const z = {
3
3
  key: 0,
4
4
  class: "of-status-summary__sep",
@@ -16,17 +16,17 @@ const z = {
16
16
  separator: { type: Boolean, default: !1 }
17
17
  },
18
18
  setup(o) {
19
- const u = o, l = i(() => u.size === "sm" ? "6px" : "7px"), m = i(() => u.size === "sm" ? "10px" : "11px");
19
+ const u = o, l = c(() => u.size === "sm" ? "6px" : "7px"), m = c(() => u.size === "sm" ? "10px" : "11px");
20
20
  function p(t) {
21
- return t.color ?? "var(--of-border-subtle)";
21
+ return t.color ?? "var(--of-border-workspace)";
22
22
  }
23
23
  function y(t) {
24
24
  return t.highlight ? "var(--of-accent-strong)" : "var(--of-text-primary)";
25
25
  }
26
- return (t, b) => (s(), a("div", g({
26
+ return (t, C) => (s(), a("div", g({
27
27
  class: ["of-status-summary", `of-status-summary--${o.size}`]
28
28
  }, t.$attrs), [
29
- (s(!0), a(c, null, S(o.items, (e, h) => (s(), a(c, {
29
+ (s(!0), a(i, null, S(o.items, (e, h) => (s(), a(i, {
30
30
  key: e.key
31
31
  }, [
32
32
  o.separator && h > 0 ? (s(), a("span", z)) : f("", !0),
@@ -0,0 +1,41 @@
1
+ import { DatabaseViewResolvedDetailPresentation } from '../../contracts/database';
2
+ import { DatabaseDetailPropertyItem, DatabaseWorkspaceModeOption } from './databaseViewUtils';
3
+ type __VLS_Props = {
4
+ visible: boolean;
5
+ title: string;
6
+ rowId: string;
7
+ recordId?: string;
8
+ viewType: string;
9
+ description: string;
10
+ presentation: DatabaseViewResolvedDetailPresentation;
11
+ sidePanelWidth: number;
12
+ drawerWidth: number;
13
+ canSwitchPresentation?: boolean;
14
+ workspaceModes?: DatabaseWorkspaceModeOption[];
15
+ propertyItems?: DatabaseDetailPropertyItem[];
16
+ readonly?: boolean;
17
+ hasDraftChanges?: boolean;
18
+ };
19
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ delete: (rowId: string) => any;
21
+ close: () => any;
22
+ save: () => any;
23
+ commit: (rowId: string, fieldId: string, value: unknown) => any;
24
+ "update:width": (value: number) => any;
25
+ "update:presentation": (value: DatabaseViewResolvedDetailPresentation) => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onDelete?: ((rowId: string) => any) | undefined;
28
+ onClose?: (() => any) | undefined;
29
+ onSave?: (() => any) | undefined;
30
+ onCommit?: ((rowId: string, fieldId: string, value: unknown) => any) | undefined;
31
+ "onUpdate:width"?: ((value: number) => any) | undefined;
32
+ "onUpdate:presentation"?: ((value: DatabaseViewResolvedDetailPresentation) => any) | undefined;
33
+ }>, {
34
+ readonly: boolean;
35
+ recordId: string;
36
+ canSwitchPresentation: boolean;
37
+ workspaceModes: DatabaseWorkspaceModeOption[];
38
+ propertyItems: DatabaseDetailPropertyItem[];
39
+ hasDraftChanges: boolean;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
+ export default _default;
@@ -0,0 +1,76 @@
1
+ import { defineComponent as m, computed as n, openBlock as u, createBlock as f, resolveDynamicComponent as w, mergeProps as c, withCtx as y, createVNode as v, createCommentVNode as h } from "vue";
2
+ import C from "../overlay/Drawer.vue.js";
3
+ import D from "../overlay/SidePanel.vue.js";
4
+ import b from "./DatabaseDetailWorkspace.vue.js";
5
+ const I = /* @__PURE__ */ m({
6
+ name: "DatabaseDetailPresenter",
7
+ __name: "DatabaseDetailPresenter",
8
+ props: {
9
+ visible: { type: Boolean },
10
+ title: {},
11
+ rowId: {},
12
+ recordId: { default: "" },
13
+ viewType: {},
14
+ description: {},
15
+ presentation: {},
16
+ sidePanelWidth: {},
17
+ drawerWidth: {},
18
+ canSwitchPresentation: { type: Boolean, default: !1 },
19
+ workspaceModes: { default: () => [] },
20
+ propertyItems: { default: () => [] },
21
+ readonly: { type: Boolean, default: !1 },
22
+ hasDraftChanges: { type: Boolean, default: !1 }
23
+ },
24
+ emits: ["commit", "save", "delete", "close", "update:width", "update:presentation"],
25
+ setup(i, { emit: s }) {
26
+ const e = i, r = s;
27
+ function l(a, t, o) {
28
+ r("commit", a, t, o);
29
+ }
30
+ const d = n(
31
+ () => e.presentation === "side-panel" ? D : C
32
+ ), p = n(() => e.presentation === "side-panel" ? {
33
+ modelValue: e.visible,
34
+ title: e.title,
35
+ width: e.sidePanelWidth,
36
+ resizable: !0,
37
+ mode: "persistent"
38
+ } : {
39
+ modelValue: e.visible,
40
+ title: e.title,
41
+ width: e.drawerWidth,
42
+ resizable: e.presentation !== "full-page",
43
+ fullscreen: e.presentation === "full-page",
44
+ maskClosable: !0
45
+ });
46
+ return (a, t) => e.visible ? (u(), f(w(d.value), c({ key: 0 }, p.value, {
47
+ "onUpdate:width": t[4] || (t[4] = (o) => r("update:width", o)),
48
+ "onUpdate:modelValue": t[5] || (t[5] = (o) => r("close"))
49
+ }), {
50
+ default: y(() => [
51
+ v(b, {
52
+ "row-id": e.rowId,
53
+ "record-id": e.recordId,
54
+ title: e.title,
55
+ description: e.description,
56
+ "view-type": e.viewType,
57
+ presentation: e.presentation,
58
+ "can-switch-presentation": e.canSwitchPresentation,
59
+ "workspace-modes": e.workspaceModes,
60
+ "property-items": e.propertyItems,
61
+ readonly: e.readonly,
62
+ "has-draft-changes": e.hasDraftChanges,
63
+ onCommit: l,
64
+ onSave: t[0] || (t[0] = (o) => r("save")),
65
+ onDelete: t[1] || (t[1] = (o) => r("delete", o)),
66
+ onClose: t[2] || (t[2] = (o) => r("close")),
67
+ "onUpdate:presentation": t[3] || (t[3] = (o) => r("update:presentation", o))
68
+ }, null, 8, ["row-id", "record-id", "title", "description", "view-type", "presentation", "can-switch-presentation", "workspace-modes", "property-items", "readonly", "has-draft-changes"])
69
+ ]),
70
+ _: 1
71
+ }, 16)) : h("", !0);
72
+ }
73
+ });
74
+ export {
75
+ I as default
76
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DatabaseDetailPresenter.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,37 @@
1
+ import { CellValue as FieldCellValue } from '../table/FieldCell.vue';
2
+ import { DatabaseViewResolvedDetailPresentation } from '../../contracts/database';
3
+ import { DatabaseDetailPropertyItem, DatabaseWorkspaceModeOption } from './databaseViewUtils';
4
+ type __VLS_Props = {
5
+ rowId: string;
6
+ title: string;
7
+ description: string;
8
+ recordId?: string;
9
+ viewType: string;
10
+ presentation: DatabaseViewResolvedDetailPresentation;
11
+ canSwitchPresentation?: boolean;
12
+ workspaceModes?: DatabaseWorkspaceModeOption[];
13
+ propertyItems?: DatabaseDetailPropertyItem[];
14
+ readonly?: boolean;
15
+ hasDraftChanges?: boolean;
16
+ };
17
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ delete: (rowId: string) => any;
19
+ close: () => any;
20
+ save: () => any;
21
+ commit: (rowId: string, fieldId: string, value: FieldCellValue) => any;
22
+ "update:presentation": (value: DatabaseViewResolvedDetailPresentation) => any;
23
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ onDelete?: ((rowId: string) => any) | undefined;
25
+ onClose?: (() => any) | undefined;
26
+ onSave?: (() => any) | undefined;
27
+ onCommit?: ((rowId: string, fieldId: string, value: FieldCellValue) => any) | undefined;
28
+ "onUpdate:presentation"?: ((value: DatabaseViewResolvedDetailPresentation) => any) | undefined;
29
+ }>, {
30
+ readonly: boolean;
31
+ recordId: string;
32
+ canSwitchPresentation: boolean;
33
+ workspaceModes: DatabaseWorkspaceModeOption[];
34
+ propertyItems: DatabaseDetailPropertyItem[];
35
+ hasDraftChanges: boolean;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
37
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import a from "./DatabaseDetailWorkspace.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(a, [["__scopeId", "data-v-ce454dd8"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,103 @@
1
+ import { defineComponent as v, openBlock as s, createBlock as c, withCtx as n, createElementVNode as t, createElementBlock as i, Fragment as p, renderList as _, toDisplayString as l, normalizeClass as u, createCommentVNode as k } from "vue";
2
+ import m from "../detail/DetailLayout.vue.js";
3
+ import y from "../table/FieldCell.vue.js";
4
+ const h = {
5
+ key: 0,
6
+ class: "of-database-view__workspace-modes",
7
+ "data-role": "workspace-mode-switch"
8
+ }, C = ["data-mode", "onClick"], D = { class: "of-database-view__workspace-chip" }, I = { class: "of-database-view__workspace-chip" }, B = { class: "of-database-view__workspace-chip" }, g = ["data-record-id"], x = { class: "of-database-view__detail-workspace-properties" }, $ = { class: "of-database-view__detail-workspace-label" }, F = { class: "of-database-view__detail-workspace-value" }, S = {
9
+ key: 1,
10
+ class: "of-database-view__detail-workspace-fallback"
11
+ }, T = ["disabled"], V = /* @__PURE__ */ v({
12
+ name: "DatabaseDetailWorkspace",
13
+ __name: "DatabaseDetailWorkspace",
14
+ props: {
15
+ rowId: {},
16
+ title: {},
17
+ description: {},
18
+ recordId: { default: "" },
19
+ viewType: {},
20
+ presentation: {},
21
+ canSwitchPresentation: { type: Boolean, default: !1 },
22
+ workspaceModes: { default: () => [] },
23
+ propertyItems: { default: () => [] },
24
+ readonly: { type: Boolean, default: !1 },
25
+ hasDraftChanges: { type: Boolean, default: !1 }
26
+ },
27
+ emits: ["commit", "save", "delete", "close", "update:presentation"],
28
+ setup(w, { emit: f }) {
29
+ const a = w, d = f;
30
+ function b(r, o, e) {
31
+ d("commit", r, o, e);
32
+ }
33
+ return (r, o) => (s(), c(m, {
34
+ title: a.title,
35
+ comments: [],
36
+ "description-content": a.description,
37
+ "description-editable": !1
38
+ }, {
39
+ meta: n(() => [
40
+ a.canSwitchPresentation ? (s(), i("div", h, [
41
+ (s(!0), i(p, null, _(a.workspaceModes, (e) => (s(), i("button", {
42
+ key: e.value,
43
+ type: "button",
44
+ class: u(["of-database-view__workspace-mode-btn", { "of-database-view__workspace-mode-btn--active": a.presentation === e.value }]),
45
+ "data-mode": e.value,
46
+ onClick: (E) => d("update:presentation", e.value)
47
+ }, l(e.label), 11, C))), 128))
48
+ ])) : k("", !0),
49
+ t("span", D, l(a.recordId || "record"), 1),
50
+ t("span", I, l(a.viewType), 1),
51
+ t("span", B, l(a.presentation), 1)
52
+ ]),
53
+ props: n(() => [
54
+ t("div", {
55
+ class: "of-database-view__detail-workspace",
56
+ "data-record-id": a.recordId
57
+ }, [
58
+ t("section", x, [
59
+ (s(!0), i(p, null, _(a.propertyItems, (e) => (s(), i("div", {
60
+ key: e.key,
61
+ class: "of-database-view__detail-workspace-field"
62
+ }, [
63
+ t("span", $, l(e.label), 1),
64
+ t("div", F, [
65
+ e.field ? (s(), c(y, {
66
+ key: 0,
67
+ "row-id": a.rowId,
68
+ field: e.field,
69
+ value: e.value,
70
+ readonly: a.readonly,
71
+ onCommit: b
72
+ }, null, 8, ["row-id", "field", "value", "readonly"])) : (s(), i("span", S, l(e.fallbackText), 1))
73
+ ])
74
+ ]))), 128))
75
+ ])
76
+ ], 8, g)
77
+ ]),
78
+ footer: n(() => [
79
+ t("button", {
80
+ class: "of-database-view__detail-workspace-btn of-database-view__detail-workspace-btn--delete",
81
+ type: "button",
82
+ onClick: o[0] || (o[0] = (e) => d("delete", a.rowId))
83
+ }, " 删除 "),
84
+ o[3] || (o[3] = t("div", { class: "of-database-view__detail-workspace-footer-spacer" }, null, -1)),
85
+ t("button", {
86
+ class: "of-database-view__detail-workspace-btn of-database-view__detail-workspace-btn--cancel",
87
+ type: "button",
88
+ onClick: o[1] || (o[1] = (e) => d("close"))
89
+ }, " 取消 "),
90
+ t("button", {
91
+ class: "of-database-view__detail-workspace-btn of-database-view__detail-workspace-btn--save",
92
+ type: "button",
93
+ disabled: a.readonly || !a.hasDraftChanges,
94
+ onClick: o[2] || (o[2] = (e) => d("save"))
95
+ }, " 保存 ", 8, T)
96
+ ]),
97
+ _: 1
98
+ }, 8, ["title", "description-content"]));
99
+ }
100
+ });
101
+ export {
102
+ V as default
103
+ };