@oneflowui/ui 0.5.6 → 0.5.8

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 (213) hide show
  1. package/README.md +11 -0
  2. package/dist/components/ContextMenu/index.vue.js +2 -2
  3. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
  5. package/dist/components/Dashboard/index.vue.d.ts +3 -2
  6. package/dist/components/Dashboard/index.vue.js +2 -2
  7. package/dist/components/ai/AiSender.vue.js +2 -2
  8. package/dist/components/ai/AiSender.vue2.js +8 -7
  9. package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
  10. package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
  11. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  12. package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
  13. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  14. package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
  15. package/dist/components/base/Accordion.vue.js +1 -1
  16. package/dist/components/base/Avatar.vue.d.ts +3 -0
  17. package/dist/components/base/Avatar.vue.js +4 -4
  18. package/dist/components/base/Avatar.vue2.js +8 -8
  19. package/dist/components/base/Badge.vue.d.ts +2 -0
  20. package/dist/components/base/Badge.vue.js +2 -2
  21. package/dist/components/base/Badge.vue2.js +2 -2
  22. package/dist/components/base/ButtonGroup.vue.js +2 -2
  23. package/dist/components/base/ButtonGroup.vue2.js +2 -2
  24. package/dist/components/base/ChainItem.vue.d.ts +6 -0
  25. package/dist/components/base/ChainItem.vue.js +2 -2
  26. package/dist/components/base/ChainItem.vue2.js +17 -17
  27. package/dist/components/base/DropdownMenu.vue.js +2 -2
  28. package/dist/components/base/DropdownMenu.vue2.js +22 -20
  29. package/dist/components/base/EmptyState.vue.js +2 -2
  30. package/dist/components/base/EmptyState.vue2.js +2 -2
  31. package/dist/components/base/InfoCard.vue.d.ts +9 -0
  32. package/dist/components/base/InfoCard.vue.js +2 -2
  33. package/dist/components/base/InfoCard.vue2.js +65 -57
  34. package/dist/components/base/MonitorItem.vue.js +2 -2
  35. package/dist/components/base/MonitorItem.vue2.js +33 -25
  36. package/dist/components/base/PersonaCard.vue.d.ts +5 -0
  37. package/dist/components/base/PersonaCard.vue.js +3 -3
  38. package/dist/components/base/PersonaCard.vue2.js +56 -50
  39. package/dist/components/base/ProgressBar.vue.d.ts +1 -0
  40. package/dist/components/base/ProgressBar.vue.js +2 -2
  41. package/dist/components/base/ProgressBar.vue2.js +10 -10
  42. package/dist/components/base/RangeSlider.vue.d.ts +15 -0
  43. package/dist/components/base/RangeSlider.vue.js +1 -1
  44. package/dist/components/base/RangeSlider.vue2.js +22 -15
  45. package/dist/components/base/RefTag.vue.d.ts +4 -0
  46. package/dist/components/base/RefTag.vue.js +3 -3
  47. package/dist/components/base/RefTag.vue2.js +14 -14
  48. package/dist/components/base/SearchHighlight.vue.js +1 -1
  49. package/dist/components/base/SectionBlock.vue.js +2 -2
  50. package/dist/components/base/SectionBlock.vue2.js +54 -48
  51. package/dist/components/base/SelectBadge.vue.d.ts +5 -0
  52. package/dist/components/base/SelectBadge.vue.js +3 -3
  53. package/dist/components/base/SelectBadge.vue2.js +36 -28
  54. package/dist/components/base/StatisticCard.vue.js +1 -1
  55. package/dist/components/base/StatusIndicator.vue.js +2 -2
  56. package/dist/components/base/StatusIndicator.vue2.js +2 -2
  57. package/dist/components/base/StatusSummary.vue.js +2 -2
  58. package/dist/components/base/Stepper.vue.js +2 -2
  59. package/dist/components/base/Switch.vue.js +2 -2
  60. package/dist/components/base/ToolbarBtn.vue.js +2 -2
  61. package/dist/components/base/ViewModeGroup.vue.js +1 -1
  62. package/dist/components/base/ViewModeGroup.vue2.js +3 -3
  63. package/dist/components/base/ViewSwitcher.vue.js +1 -1
  64. package/dist/components/base/ViewSwitcher.vue2.js +3 -3
  65. package/dist/components/base/ViewTab.vue.js +1 -1
  66. package/dist/components/base/ViewTab.vue2.js +5 -6
  67. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  68. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
  69. package/dist/components/database/DatabaseView.vue.d.ts +6 -1
  70. package/dist/components/database/DatabaseView.vue.js +2 -2
  71. package/dist/components/database/DatabaseView.vue2.js +438 -293
  72. package/dist/components/detail/PropPanel.vue.js +2 -2
  73. package/dist/components/detail/PropPanel.vue2.js +34 -30
  74. package/dist/components/detail/PropRow.vue.d.ts +6 -0
  75. package/dist/components/detail/PropRow.vue.js +2 -2
  76. package/dist/components/detail/PropRow.vue2.js +24 -24
  77. package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
  78. package/dist/components/editor/BlockQuote.vue.js +1 -1
  79. package/dist/components/editor/BlockQuote.vue2.js +43 -29
  80. package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
  81. package/dist/components/editor/ContentBlock.vue.js +2 -2
  82. package/dist/components/editor/ContentBlock.vue2.js +54 -33
  83. package/dist/components/editor/RichTextEditor.vue.js +2 -2
  84. package/dist/components/editor/RichTextEditor.vue2.js +10 -14
  85. package/dist/components/field/FieldAttachment.vue.js +2 -2
  86. package/dist/components/field/FieldAttachment.vue2.js +30 -32
  87. package/dist/components/field/FieldAutoNumber.vue.js +2 -2
  88. package/dist/components/field/FieldCheckbox.vue.js +2 -2
  89. package/dist/components/field/FieldCheckbox.vue2.js +13 -11
  90. package/dist/components/field/FieldCreator.vue.js +2 -2
  91. package/dist/components/field/FieldCurrency.vue.js +2 -2
  92. package/dist/components/field/FieldCurrency.vue2.js +15 -14
  93. package/dist/components/field/FieldDate.vue.js +1 -1
  94. package/dist/components/field/FieldDate.vue2.js +14 -16
  95. package/dist/components/field/FieldDatetime.vue.js +1 -1
  96. package/dist/components/field/FieldDatetime.vue2.js +12 -11
  97. package/dist/components/field/FieldEmail.vue.js +2 -2
  98. package/dist/components/field/FieldEmail.vue2.js +14 -13
  99. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  100. package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
  101. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  102. package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
  103. package/dist/components/field/FieldNumber.vue.js +3 -3
  104. package/dist/components/field/FieldNumber.vue2.js +19 -18
  105. package/dist/components/field/FieldPhone.vue.js +2 -2
  106. package/dist/components/field/FieldPhone.vue2.js +12 -11
  107. package/dist/components/field/FieldProgress.vue.js +1 -1
  108. package/dist/components/field/FieldProgress.vue2.js +18 -17
  109. package/dist/components/field/FieldRating.vue.js +2 -2
  110. package/dist/components/field/FieldRating.vue2.js +22 -16
  111. package/dist/components/field/FieldRelation.vue.js +1 -1
  112. package/dist/components/field/FieldRelation.vue2.js +25 -22
  113. package/dist/components/field/FieldRichText.vue.js +1 -1
  114. package/dist/components/field/FieldRichText.vue2.js +10 -7
  115. package/dist/components/field/FieldSelect.vue.js +2 -2
  116. package/dist/components/field/FieldSelect.vue2.js +81 -63
  117. package/dist/components/field/FieldText.vue.js +2 -2
  118. package/dist/components/field/FieldText.vue2.js +17 -16
  119. package/dist/components/field/FieldUrl.vue.js +2 -2
  120. package/dist/components/field/FieldUrl.vue2.js +17 -16
  121. package/dist/components/form/FormDesigner.vue.js +2 -2
  122. package/dist/components/form/FormDesigner.vue2.js +83 -78
  123. package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
  124. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  125. package/dist/components/gallery/GalleryCard.vue2.js +2 -1
  126. package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
  127. package/dist/components/kanban/KanbanCard.vue.js +1 -1
  128. package/dist/components/kanban/KanbanCard.vue2.js +15 -14
  129. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
  130. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  131. package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
  132. package/dist/components/kanban/QuickAddRow.vue.js +2 -2
  133. package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
  134. package/dist/components/layout/Navbar.vue.js +3 -3
  135. package/dist/components/layout/Navbar.vue2.js +5 -4
  136. package/dist/components/layout/Sidebar.vue.js +2 -2
  137. package/dist/components/layout/Sidebar.vue2.js +1 -1
  138. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  139. package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
  140. package/dist/components/overlay/Dialog.vue.d.ts +1 -0
  141. package/dist/components/overlay/Dialog.vue.js +1 -1
  142. package/dist/components/overlay/Dialog.vue2.js +9 -9
  143. package/dist/components/overlay/Drawer.vue.d.ts +2 -1
  144. package/dist/components/overlay/Drawer.vue.js +2 -2
  145. package/dist/components/overlay/Drawer.vue2.js +35 -29
  146. package/dist/components/overlay/Modal.vue.d.ts +2 -1
  147. package/dist/components/overlay/Modal.vue.js +1 -1
  148. package/dist/components/overlay/Modal.vue2.js +34 -28
  149. package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
  150. package/dist/components/overlay/SidePanel.vue.js +1 -1
  151. package/dist/components/overlay/SidePanel.vue2.js +6 -6
  152. package/dist/components/split/SplitPane.vue.js +2 -2
  153. package/dist/components/split/SplitPane.vue2.js +11 -9
  154. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +4 -2
  155. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  156. package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
  157. package/dist/components/table/DataTable.vue.d.ts +9 -6
  158. package/dist/components/table/DataTable.vue.js +2 -2
  159. package/dist/components/table/DataTable.vue2.js +643 -521
  160. package/dist/components/table/DetailSheet.vue.d.ts +2 -0
  161. package/dist/components/table/DetailSheet.vue.js +2 -2
  162. package/dist/components/table/DetailSheet.vue2.js +154 -70
  163. package/dist/components/table/FieldCell.vue.d.ts +2 -1
  164. package/dist/components/table/FieldCell.vue.js +1 -1
  165. package/dist/components/table/FieldCell.vue2.js +57 -48
  166. package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
  167. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  168. package/dist/components/table/FieldTypePicker.vue2.js +1 -1
  169. package/dist/components/table/MobileListView.vue.d.ts +3 -2
  170. package/dist/components/table/MobileListView.vue.js +2 -2
  171. package/dist/components/table/MobileListView.vue2.js +57 -50
  172. package/dist/components/table/TableColumnManager.vue.js +1 -1
  173. package/dist/components/table/TableColumnManager.vue2.js +29 -28
  174. package/dist/components/table/TableDataRow.vue.d.ts +5 -1
  175. package/dist/components/table/TableDataRow.vue.js +3 -3
  176. package/dist/components/table/TableDataRow.vue2.js +102 -63
  177. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  178. package/dist/components/table/TableFilterPanel.vue2.js +3 -0
  179. package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
  180. package/dist/components/table/TableGroupRow.vue.js +2 -2
  181. package/dist/components/table/TableGroupRow.vue2.js +35 -30
  182. package/dist/components/table/TableHeaderRow.vue.d.ts +3 -1
  183. package/dist/components/table/TableHeaderRow.vue.js +1 -1
  184. package/dist/components/table/TableHeaderRow.vue2.js +111 -58
  185. package/dist/components/table/TableToolbar.vue.js +1 -1
  186. package/dist/components/table/TableToolbar.vue2.js +2 -2
  187. package/dist/components/tabs/TabPanel.vue.js +4 -4
  188. package/dist/components/tabs/TabPanel.vue2.js +1 -1
  189. package/dist/components/tabs/Tabs.vue.js +2 -2
  190. package/dist/components/tabs/Tabs.vue2.js +2 -2
  191. package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
  192. package/dist/components/timeline/GanttRow.vue.js +2 -2
  193. package/dist/components/timeline/GanttRow.vue2.js +68 -52
  194. package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
  195. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  196. package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
  197. package/dist/composables/useColumnResize.d.ts +4 -1
  198. package/dist/composables/useColumnResize.js +114 -45
  199. package/dist/composables/useKeyboardNavigation.d.ts +1 -1
  200. package/dist/composables/useRowDrag.d.ts +7 -5
  201. package/dist/composables/useRowDrag.js +24 -24
  202. package/dist/composables/useSupabaseProvider.d.ts +8 -1
  203. package/dist/composables/useTableData.d.ts +5 -3
  204. package/dist/composables/useTableGroup.d.ts +2 -2
  205. package/dist/composables/useViewPersistence.d.ts +32 -3
  206. package/dist/composables/useVirtualList.d.ts +1 -0
  207. package/dist/composables/useVirtualList.js +94 -81
  208. package/dist/plugin.js +103 -102
  209. package/dist/style.css +1 -1
  210. package/dist/types/index.d.ts +2 -1
  211. package/dist/utils/echarts.d.ts +1 -0
  212. package/dist/utils/supabaseSchema.d.ts +12 -0
  213. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldCheckbox.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-85298790"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a1ca06f"]]);
5
5
  export {
6
- p as default
6
+ e as default
7
7
  };
@@ -1,27 +1,29 @@
1
- import { defineComponent as s, computed as f, openBlock as p, createElementBlock as r, withModifiers as m, createElementVNode as d, toDisplayString as u } from "vue";
2
- const k = { class: "of-field-checkbox__icon" }, x = /* @__PURE__ */ s({
1
+ import { defineComponent as s, computed as r, openBlock as f, createElementBlock as d, withModifiers as p, createElementVNode as m, toDisplayString as u } from "vue";
2
+ const k = ["aria-checked"], _ = { class: "of-field-checkbox__icon" }, x = /* @__PURE__ */ s({
3
3
  __name: "FieldCheckbox",
4
4
  props: {
5
5
  value: {},
6
6
  field: {}
7
7
  },
8
8
  emits: ["commit", "cancel", "tabNext"],
9
- setup(n, { emit: i }) {
10
- const a = n, t = i, o = f(() => !!a.value);
11
- function c() {
12
- t("commit", !o.value);
9
+ setup(n, { emit: a }) {
10
+ const i = n, t = a, c = r(() => !!i.value);
11
+ function o() {
12
+ t("commit", !c.value);
13
13
  }
14
14
  function l(e) {
15
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), c()), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("tabNext"));
15
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o()), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("tabNext"));
16
16
  }
17
- return (e, _) => (p(), r("div", {
17
+ return (e, h) => (f(), d("div", {
18
18
  class: "of-field-checkbox",
19
+ role: "checkbox",
20
+ "aria-checked": c.value,
19
21
  tabindex: "0",
20
- onClick: m(c, ["stop"]),
22
+ onClick: p(o, ["stop"]),
21
23
  onKeydown: l
22
24
  }, [
23
- d("span", k, u(o.value ? "☑" : "☐"), 1)
24
- ], 32));
25
+ m("span", _, u(c.value ? "☑" : "☐"), 1)
26
+ ], 40, k));
25
27
  }
26
28
  });
27
29
  export {
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldCreator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-18c4089c"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e68ff06a"]]);
5
5
  export {
6
- e as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldCurrency.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-bc4bce47"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-891caf93"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as p, ref as c, onMounted as y, nextTick as v, openBlock as N, createElementBlock as b, createElementVNode as a, toDisplayString as k, unref as x, withDirectives as _, vModelText as C } from "vue";
2
- const D = { class: "of-field-currency" }, g = { class: "of-field-currency-symbol" }, E = /* @__PURE__ */ p({
1
+ import { defineComponent as p, ref as a, onMounted as y, nextTick as v, openBlock as b, createElementBlock as N, createElementVNode as s, toDisplayString as k, unref as x, withDirectives as _, vModelText as C } from "vue";
2
+ const D = { class: "of-field-currency" }, g = { class: "of-field-currency-symbol" }, B = ["aria-label"], S = /* @__PURE__ */ p({
3
3
  __name: "FieldCurrency",
4
4
  props: {
5
5
  value: { type: [String, Number, Boolean, Array, null] },
6
6
  field: {}
7
7
  },
8
8
  emits: ["commit", "cancel", "tabNext"],
9
- setup(s, { emit: f }) {
10
- const n = s, l = f, u = c(null), o = c(n.value === null || n.value === void 0 ? "" : String(n.value)), m = n.field.type === "currency" && "currencyCode" in n.field && n.field.currencyCode === "CNY" ? "¥" : "$";
9
+ setup(i, { emit: f }) {
10
+ const n = i, l = f, u = a(null), o = a(n.value === null || n.value === void 0 ? "" : String(n.value)), d = n.field.type === "currency" && "currencyCode" in n.field && n.field.currencyCode === "CNY" ? "¥" : "$";
11
11
  y(() => v(() => {
12
12
  var e;
13
13
  return (e = u.value) == null ? void 0 : e.focus();
@@ -17,26 +17,27 @@ const D = { class: "of-field-currency" }, g = { class: "of-field-currency-symbol
17
17
  const e = o.value.replace(/[^0-9.-]/g, ""), t = Number(e);
18
18
  return Number.isNaN(t) ? null : t;
19
19
  }
20
- function d(e) {
20
+ function m(e) {
21
21
  e.key === "Enter" && (e.preventDefault(), l("commit", r())), e.key === "Escape" && (e.preventDefault(), l("cancel")), e.key === "Tab" && (e.preventDefault(), l("commit", r()), l("tabNext"));
22
22
  }
23
- return (e, t) => (N(), b("div", D, [
24
- a("span", g, k(x(m)), 1),
25
- _(a("input", {
23
+ return (e, t) => (b(), N("div", D, [
24
+ s("span", g, k(x(d)), 1),
25
+ _(s("input", {
26
26
  ref_key: "inputRef",
27
27
  ref: u,
28
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => o.value = c),
29
+ inputmode: "decimal",
28
30
  class: "of-field-input",
29
31
  type: "text",
30
- inputmode: "decimal",
31
- "onUpdate:modelValue": t[0] || (t[0] = (i) => o.value = i),
32
- onKeydown: d,
33
- onBlur: t[1] || (t[1] = (i) => l("commit", r()))
34
- }, null, 544), [
32
+ "aria-label": i.field.label,
33
+ onKeydown: m,
34
+ onBlur: t[1] || (t[1] = (c) => l("commit", r()))
35
+ }, null, 40, B), [
35
36
  [C, o.value]
36
37
  ])
37
38
  ]));
38
39
  }
39
40
  });
40
41
  export {
41
- E as default
42
+ S as default
42
43
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldDate.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-53830361"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-29e2d8b1"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,6 +1,5 @@
1
- import { defineComponent as m, ref as i, onMounted as c, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as k, vModelText as y } from "vue";
2
- import { useBreakpoint as x } from "../../composables/useBreakpoint.js";
3
- const b = /* @__PURE__ */ m({
1
+ import { defineComponent as m, ref as u, onMounted as p, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as b } from "vue";
2
+ const k = ["aria-label"], D = /* @__PURE__ */ m({
4
3
  __name: "FieldDate",
5
4
  props: {
6
5
  value: { type: [String, Number, Boolean, Array, null] },
@@ -8,29 +7,28 @@ const b = /* @__PURE__ */ m({
8
7
  },
9
8
  emits: ["commit", "cancel", "tabNext"],
10
9
  setup(a, { emit: r }) {
11
- const p = a, t = r;
12
- x();
13
- const o = i(null), n = i(String(p.value ?? ""));
14
- c(() => s(() => {
10
+ const f = a, t = r, o = u(null), l = u(String(f.value ?? ""));
11
+ p(() => s(() => {
15
12
  var e;
16
13
  return (e = o.value) == null ? void 0 : e.focus();
17
14
  }));
18
- function f(e) {
19
- e.key === "Enter" && (e.preventDefault(), t("commit", n.value || null)), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("commit", n.value || null), t("tabNext"));
15
+ function c(e) {
16
+ e.key === "Enter" && (e.preventDefault(), t("commit", l.value || null)), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("commit", l.value || null), t("tabNext"));
20
17
  }
21
- return (e, l) => v((d(), k("input", {
18
+ return (e, n) => v((d(), y("input", {
22
19
  ref_key: "inputRef",
23
20
  ref: o,
24
- "onUpdate:modelValue": l[0] || (l[0] = (u) => n.value = u),
21
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => l.value = i),
25
22
  class: "of-field-input",
26
23
  type: "date",
27
- onKeydown: f,
28
- onBlur: l[1] || (l[1] = (u) => t("commit", n.value || null))
29
- }, null, 544)), [
30
- [y, n.value]
24
+ "aria-label": a.field.label,
25
+ onKeydown: c,
26
+ onBlur: n[1] || (n[1] = (i) => t("commit", l.value || null))
27
+ }, null, 40, k)), [
28
+ [b, l.value]
31
29
  ]);
32
30
  }
33
31
  });
34
32
  export {
35
- b as default
33
+ D as default
36
34
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./FieldDatetime.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-86258ef1"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-61bebf31"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as f, ref as i, onMounted as p, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as k } from "vue";
2
- const D = /* @__PURE__ */ f({
1
+ import { defineComponent as m, ref as u, onMounted as p, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as b } from "vue";
2
+ const k = ["aria-label"], D = /* @__PURE__ */ m({
3
3
  __name: "FieldDatetime",
4
4
  props: {
5
5
  value: { type: [String, Number, Boolean, Array, null] },
@@ -7,24 +7,25 @@ const D = /* @__PURE__ */ f({
7
7
  },
8
8
  emits: ["commit", "cancel", "tabNext"],
9
9
  setup(a, { emit: r }) {
10
- const m = a, t = r, o = i(null), n = i(String(m.value ?? ""));
10
+ const c = a, t = r, o = u(null), l = u(String(c.value ?? ""));
11
11
  p(() => s(() => {
12
12
  var e;
13
13
  return (e = o.value) == null ? void 0 : e.focus();
14
14
  }));
15
- function c(e) {
16
- e.key === "Enter" && (e.preventDefault(), t("commit", n.value || null)), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("commit", n.value || null), t("tabNext"));
15
+ function f(e) {
16
+ e.key === "Enter" && (e.preventDefault(), t("commit", l.value || null)), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("commit", l.value || null), t("tabNext"));
17
17
  }
18
- return (e, l) => v((d(), y("input", {
18
+ return (e, n) => v((d(), y("input", {
19
19
  ref_key: "inputRef",
20
20
  ref: o,
21
- "onUpdate:modelValue": l[0] || (l[0] = (u) => n.value = u),
21
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => l.value = i),
22
22
  class: "of-field-input",
23
23
  type: "datetime-local",
24
- onKeydown: c,
25
- onBlur: l[1] || (l[1] = (u) => t("commit", n.value || null))
26
- }, null, 544)), [
27
- [k, n.value]
24
+ "aria-label": a.field.label,
25
+ onKeydown: f,
26
+ onBlur: n[1] || (n[1] = (i) => t("commit", l.value || null))
27
+ }, null, 40, k)), [
28
+ [b, l.value]
28
29
  ]);
29
30
  }
30
31
  });
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldEmail.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-57da6247"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bf58d650"]]);
5
5
  export {
6
- i as default
6
+ f as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as p, ref as u, onMounted as c, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as k } from "vue";
2
- const b = /* @__PURE__ */ p({
1
+ import { defineComponent as c, ref as u, onMounted as p, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as b } from "vue";
2
+ const k = ["aria-label"], B = /* @__PURE__ */ c({
3
3
  __name: "FieldEmail",
4
4
  props: {
5
5
  value: { type: [String, Number, Boolean, Array, null] },
@@ -7,27 +7,28 @@ const b = /* @__PURE__ */ p({
7
7
  },
8
8
  emits: ["commit", "cancel", "tabNext"],
9
9
  setup(a, { emit: r }) {
10
- const m = a, t = r, o = u(null), n = u(String(m.value ?? ""));
11
- c(() => s(() => {
10
+ const f = a, t = r, o = u(null), l = u(String(f.value ?? ""));
11
+ p(() => s(() => {
12
12
  var e;
13
13
  return (e = o.value) == null ? void 0 : e.focus();
14
14
  }));
15
- function f(e) {
16
- e.key === "Enter" && (e.preventDefault(), t("commit", n.value)), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("commit", n.value), t("tabNext"));
15
+ function m(e) {
16
+ e.key === "Enter" && (e.preventDefault(), t("commit", l.value)), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("commit", l.value), t("tabNext"));
17
17
  }
18
- return (e, l) => v((d(), y("input", {
18
+ return (e, n) => v((d(), y("input", {
19
19
  ref_key: "inputRef",
20
20
  ref: o,
21
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => l.value = i),
21
22
  class: "of-field-input",
22
23
  type: "email",
23
- "onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i),
24
- onKeydown: f,
25
- onBlur: l[1] || (l[1] = (i) => t("commit", n.value))
26
- }, null, 544)), [
27
- [k, n.value]
24
+ "aria-label": a.field.label,
25
+ onKeydown: m,
26
+ onBlur: n[1] || (n[1] = (i) => t("commit", l.value))
27
+ }, null, 40, k)), [
28
+ [b, l.value]
28
29
  ]);
29
30
  }
30
31
  });
31
32
  export {
32
- b as default
33
+ B as default
33
34
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldMarkdownPreview.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-767b8c61"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f0714bc5"]]);
5
5
  export {
6
- i as default
6
+ f as default
7
7
  };
@@ -12,7 +12,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
12
12
  onCommit?: ((value: CellValue) => any) | undefined;
13
13
  onTabNext?: (() => any) | undefined;
14
14
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
15
- triggerRef: HTMLDivElement;
15
+ triggerRef: HTMLButtonElement;
16
16
  dropdownRef: HTMLDivElement;
17
- }, HTMLDivElement>;
17
+ }, HTMLButtonElement>;
18
18
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import t from "./FieldMultiSelect.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b204fd88"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-a4e34f12"]]);
5
5
  export {
6
- i as default
6
+ f as default
7
7
  };
@@ -1,137 +1,142 @@
1
- import { defineComponent as $, ref as a, computed as M, onMounted as z, nextTick as O, onBeforeUnmount as T, watch as F, openBlock as l, createElementBlock as i, Fragment as A, renderList as L, normalizeStyle as w, toDisplayString as k, createBlock as P, Teleport as U, withModifiers as m, normalizeClass as V, createElementVNode as p, createCommentVNode as I } from "vue";
2
- const K = {
1
+ import { defineComponent as F, ref as r, computed as $, onMounted as K, nextTick as O, onBeforeUnmount as T, watch as P, openBlock as l, createElementBlock as a, Fragment as A, renderList as L, normalizeStyle as b, toDisplayString as h, createBlock as U, Teleport as V, withKeys as B, withModifiers as d, normalizeClass as S, createElementVNode as y, createCommentVNode as I } from "vue";
2
+ const W = {
3
3
  key: 0,
4
4
  class: "of-field-multiselect__chips"
5
- }, W = {
5
+ }, j = {
6
6
  key: 1,
7
7
  class: "of-field-multiselect__placeholder"
8
- }, j = ["onMouseenter", "onClick"], q = ["checked"], G = { key: 1 }, H = { class: "of-field-multiselect__actions" }, Q = /* @__PURE__ */ $({
8
+ }, q = ["aria-checked", "onMouseenter", "onClick", "onFocusin", "onKeydown"], G = { key: 1 }, H = { class: "of-field-multiselect__actions" }, Q = /* @__PURE__ */ F({
9
9
  __name: "FieldMultiSelect",
10
10
  props: {
11
11
  value: { type: [String, Number, Boolean, Array, null] },
12
12
  field: {}
13
13
  },
14
14
  emits: ["commit", "cancel", "tabNext"],
15
- setup(B, { emit: S }) {
16
- const d = B, _ = S, u = a(null), b = a(null), h = a({ top: "0px", left: "0px", width: "0px" }), f = a(!0), v = M(() => d.field.options ?? []), o = a([]), r = a(0), x = M(() => {
17
- const e = new Set(o.value);
18
- return v.value.filter((n) => e.has(n.value));
15
+ setup(N, { emit: R }) {
16
+ const f = N, w = R, s = r(null), x = r(null), g = r({ top: "0px", left: "0px", width: "0px" }), v = r(!0), m = $(() => f.field.options ?? []), n = r([]), i = r(0), C = $(() => {
17
+ const e = new Set(n.value);
18
+ return m.value.filter((o) => e.has(o.value));
19
19
  });
20
- function g() {
21
- o.value = Array.isArray(d.value) ? d.value.filter((e) => typeof e == "string") : [];
20
+ function D() {
21
+ n.value = Array.isArray(f.value) ? f.value.filter((e) => typeof e == "string") : [];
22
22
  }
23
- function s() {
24
- if (!u.value) return;
25
- const e = u.value.getBoundingClientRect();
26
- h.value = {
23
+ function c() {
24
+ if (!s.value) return;
25
+ const e = s.value.getBoundingClientRect();
26
+ g.value = {
27
27
  top: `${e.bottom}px`,
28
28
  left: `${e.left}px`,
29
29
  width: `${Math.max(e.width, 220)}px`
30
30
  };
31
31
  }
32
- function C(e) {
33
- if (o.value.indexOf(e) >= 0) {
34
- o.value = o.value.filter((t) => t !== e);
32
+ function p(e) {
33
+ if (n.value.indexOf(e) >= 0) {
34
+ n.value = n.value.filter((t) => t !== e);
35
35
  return;
36
36
  }
37
- o.value = [...o.value, e];
37
+ n.value = [...n.value, e];
38
38
  }
39
- function y() {
40
- f.value = !1, _("commit", [...o.value]);
39
+ function k() {
40
+ v.value = !1, w("commit", [...n.value]);
41
41
  }
42
- function D() {
43
- f.value && (f.value = !1, _("cancel"));
42
+ function E() {
43
+ v.value && (v.value = !1, w("cancel"));
44
44
  }
45
- function N(e) {
45
+ function z(e) {
46
46
  if (e.key === "ArrowDown") {
47
- e.preventDefault(), r.value = Math.min(r.value + 1, Math.max(v.value.length - 1, 0));
47
+ e.preventDefault(), i.value = Math.min(i.value + 1, Math.max(m.value.length - 1, 0));
48
48
  return;
49
49
  }
50
50
  if (e.key === "ArrowUp") {
51
- e.preventDefault(), r.value = Math.max(r.value - 1, 0);
51
+ e.preventDefault(), i.value = Math.max(i.value - 1, 0);
52
52
  return;
53
53
  }
54
54
  if (e.key === " " || e.key === "Enter") {
55
55
  e.preventDefault();
56
- const n = v.value[r.value];
57
- n && C(n.value);
56
+ const o = m.value[i.value];
57
+ o && p(o.value);
58
58
  return;
59
59
  }
60
60
  if (e.key === "Escape") {
61
- e.preventDefault(), D();
61
+ e.preventDefault(), E();
62
62
  return;
63
63
  }
64
- e.key === "Tab" && (e.preventDefault(), y(), _("tabNext"));
64
+ e.key === "Tab" && (e.preventDefault(), k(), w("tabNext"));
65
65
  }
66
- function E(e) {
67
- var t, c;
68
- const n = e.target;
69
- n && ((t = u.value) != null && t.contains(n) || (c = b.value) != null && c.contains(n) || y());
66
+ function M(e) {
67
+ var t, u;
68
+ const o = e.target;
69
+ o && ((t = s.value) != null && t.contains(o) || (u = x.value) != null && u.contains(o) || k());
70
70
  }
71
- return z(() => {
72
- g(), O(() => {
71
+ return K(() => {
72
+ D(), O(() => {
73
73
  var e;
74
- s(), (e = u.value) == null || e.focus();
75
- }), window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), window.addEventListener("mousedown", E, !0);
74
+ c(), (e = s.value) == null || e.focus();
75
+ }), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), window.addEventListener("mousedown", M, !0);
76
76
  }), T(() => {
77
- window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0), window.removeEventListener("mousedown", E, !0);
78
- }), F(
79
- () => d.value,
77
+ window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0), window.removeEventListener("mousedown", M, !0);
78
+ }), P(
79
+ () => f.value,
80
80
  () => {
81
- g();
81
+ D();
82
82
  }
83
- ), (e, n) => (l(), i("div", {
83
+ ), (e, o) => (l(), a("button", {
84
84
  ref_key: "triggerRef",
85
- ref: u,
85
+ ref: s,
86
+ type: "button",
86
87
  class: "of-field-multiselect",
87
- tabindex: "0",
88
- onKeydown: N
88
+ "aria-label": "多选字段编辑器",
89
+ onKeydown: z
89
90
  }, [
90
- x.value.length ? (l(), i("div", K, [
91
- (l(!0), i(A, null, L(x.value, (t) => (l(), i("span", {
91
+ C.value.length ? (l(), a("div", W, [
92
+ (l(!0), a(A, null, L(C.value, (t) => (l(), a("span", {
92
93
  key: t.value,
93
94
  class: "of-field-multiselect__badge",
94
- style: w(t.color ? { background: t.color } : void 0)
95
- }, k(t.label), 5))), 128))
96
- ])) : (l(), i("span", W, "—")),
97
- (l(), P(U, { to: "body" }, [
98
- f.value ? (l(), i("div", {
95
+ style: b(t.color ? { background: t.color } : void 0)
96
+ }, h(t.label), 5))), 128))
97
+ ])) : (l(), a("span", j, "—")),
98
+ (l(), U(V, { to: "body" }, [
99
+ v.value ? (l(), a("div", {
99
100
  key: 0,
100
101
  ref_key: "dropdownRef",
101
- ref: b,
102
+ ref: x,
102
103
  class: "of-field-multiselect__dropdown",
103
- style: w(h.value)
104
+ style: b(g.value)
104
105
  }, [
105
- (l(!0), i(A, null, L(v.value, (t, c) => (l(), i("div", {
106
+ (l(!0), a(A, null, L(m.value, (t, u) => (l(), a("button", {
106
107
  key: t.value,
107
- class: V(["of-field-multiselect__option", { active: c === r.value, selected: o.value.includes(t.value) }]),
108
- onMouseenter: (R) => r.value = c,
109
- onClick: m((R) => C(t.value), ["stop"])
108
+ type: "button",
109
+ class: S(["of-field-multiselect__option", { active: u === i.value, selected: n.value.includes(t.value) }]),
110
+ role: "checkbox",
111
+ "aria-checked": n.value.includes(t.value),
112
+ onMouseenter: (_) => i.value = u,
113
+ onClick: d((_) => p(t.value), ["stop"]),
114
+ onFocusin: (_) => i.value = u,
115
+ onKeydown: [
116
+ B(d((_) => p(t.value), ["prevent"]), ["enter"]),
117
+ B(d((_) => p(t.value), ["prevent"]), ["space"])
118
+ ]
110
119
  }, [
111
- p("input", {
112
- class: "of-field-multiselect__checkbox",
113
- type: "checkbox",
114
- tabindex: "-1",
115
- checked: o.value.includes(t.value),
116
- onChange: n[0] || (n[0] = m(() => {
117
- }, ["prevent"]))
118
- }, null, 40, q),
119
- t.color ? (l(), i("span", {
120
+ y("span", {
121
+ class: S(["of-field-multiselect__checkbox", { "of-field-multiselect__checkbox--checked": n.value.includes(t.value) }]),
122
+ "aria-hidden": "true"
123
+ }, null, 2),
124
+ t.color ? (l(), a("span", {
120
125
  key: 0,
121
126
  class: "of-field-multiselect__badge",
122
- style: w({ background: t.color })
123
- }, k(t.label), 5)) : (l(), i("span", G, k(t.label), 1))
124
- ], 42, j))), 128)),
125
- p("div", H, [
126
- p("button", {
127
+ style: b({ background: t.color })
128
+ }, h(t.label), 5)) : (l(), a("span", G, h(t.label), 1))
129
+ ], 42, q))), 128)),
130
+ y("div", H, [
131
+ y("button", {
127
132
  class: "of-field-multiselect__btn",
128
133
  type: "button",
129
- onClick: m(D, ["stop"])
134
+ onClick: d(E, ["stop"])
130
135
  }, " 取消 "),
131
- p("button", {
136
+ y("button", {
132
137
  class: "of-field-multiselect__btn of-field-multiselect__btn--primary",
133
138
  type: "button",
134
- onClick: m(y, ["stop"])
139
+ onClick: d(k, ["stop"])
135
140
  }, " 完成 ")
136
141
  ])
137
142
  ], 4)) : I("", !0)
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldNumber.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a09e5dea"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-95878be2"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };