@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,42 +1,43 @@
1
- import { defineComponent as s, ref as f, onMounted as v, nextTick as d, withDirectives as N, openBlock as b, createElementBlock as y, vModelText as k } from "vue";
2
- const x = /* @__PURE__ */ s({
1
+ import { defineComponent as p, ref as m, onMounted as v, nextTick as d, withDirectives as b, openBlock as N, createElementBlock as y, vModelText as k } from "vue";
2
+ const D = ["aria-label"], w = /* @__PURE__ */ p({
3
3
  __name: "FieldNumber",
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(m, { emit: c }) {
10
- const o = m, u = c, a = f(null), t = f(o.value === null || o.value === void 0 ? "" : String(o.value));
9
+ setup(r, { emit: c }) {
10
+ const a = r, l = c, i = m(null), t = m(a.value === null || a.value === void 0 ? "" : String(a.value));
11
11
  v(() => d(() => {
12
12
  var e;
13
- return (e = a.value) == null ? void 0 : e.focus();
13
+ return (e = i.value) == null ? void 0 : e.focus();
14
14
  }));
15
- function r() {
15
+ function o() {
16
16
  if (t.value === "") return null;
17
17
  const e = Number(t.value);
18
18
  return Number.isNaN(e) ? null : e;
19
19
  }
20
- function i(e) {
21
- const n = t.value === "" ? 0 : Number(t.value), l = Number.isNaN(n) ? 0 : n;
22
- t.value = String(l + e);
20
+ function f(e) {
21
+ const n = t.value === "" ? 0 : Number(t.value), u = Number.isNaN(n) ? 0 : n;
22
+ t.value = String(u + e);
23
23
  }
24
- function p(e) {
25
- e.key === "ArrowUp" && (e.preventDefault(), i(1)), e.key === "ArrowDown" && (e.preventDefault(), i(-1)), e.key === "Enter" && (e.preventDefault(), u("commit", r())), e.key === "Escape" && (e.preventDefault(), u("cancel")), e.key === "Tab" && (e.preventDefault(), u("commit", r()), u("tabNext"));
24
+ function s(e) {
25
+ e.key === "ArrowUp" && (e.preventDefault(), f(1)), e.key === "ArrowDown" && (e.preventDefault(), f(-1)), e.key === "Enter" && (e.preventDefault(), l("commit", o())), e.key === "Escape" && (e.preventDefault(), l("cancel")), e.key === "Tab" && (e.preventDefault(), l("commit", o()), l("tabNext"));
26
26
  }
27
- return (e, n) => N((b(), y("input", {
27
+ return (e, n) => b((N(), y("input", {
28
28
  ref_key: "inputRef",
29
- ref: a,
29
+ ref: i,
30
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => t.value = u),
30
31
  class: "of-field-input",
31
32
  type: "number",
32
- "onUpdate:modelValue": n[0] || (n[0] = (l) => t.value = l),
33
- onKeydown: p,
34
- onBlur: n[1] || (n[1] = (l) => u("commit", r()))
35
- }, null, 544)), [
33
+ "aria-label": r.field.label,
34
+ onKeydown: s,
35
+ onBlur: n[1] || (n[1] = (u) => l("commit", o()))
36
+ }, null, 40, D)), [
36
37
  [k, t.value]
37
38
  ]);
38
39
  }
39
40
  });
40
41
  export {
41
- x as default
42
+ w as default
42
43
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldPhone.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-16fe679a"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6c2ab802"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,34 +1,35 @@
1
- import { defineComponent as c, ref as i, onMounted as m, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as k } from "vue";
2
- const b = /* @__PURE__ */ c({
1
+ import { defineComponent as p, ref as r, onMounted as m, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as b } from "vue";
2
+ const k = ["aria-label"], B = /* @__PURE__ */ p({
3
3
  __name: "FieldPhone",
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(r, { emit: p }) {
10
- const o = r, t = p, u = i(null), l = i(typeof o.value == "string" ? o.value : "");
9
+ setup(o, { emit: f }) {
10
+ const a = o, t = f, u = r(null), l = r(typeof a.value == "string" ? a.value : "");
11
11
  m(() => s(() => {
12
12
  var e;
13
13
  return (e = u.value) == null ? void 0 : e.focus();
14
14
  }));
15
- function f(e) {
15
+ function c(e) {
16
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
18
  return (e, n) => v((d(), y("input", {
19
19
  ref_key: "inputRef",
20
20
  ref: u,
21
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => l.value = i),
21
22
  class: "of-field-input",
22
23
  type: "tel",
23
- "onUpdate:modelValue": n[0] || (n[0] = (a) => l.value = a),
24
+ "aria-label": o.field.label,
24
25
  placeholder: "输入电话号码",
25
- onKeydown: f,
26
- onBlur: n[1] || (n[1] = (a) => t("commit", l.value || null))
27
- }, null, 544)), [
28
- [k, l.value]
26
+ onKeydown: c,
27
+ onBlur: n[1] || (n[1] = (i) => t("commit", l.value || null))
28
+ }, null, 40, k)), [
29
+ [b, l.value]
29
30
  ]);
30
31
  }
31
32
  });
32
33
  export {
33
- b as default
34
+ B as default
34
35
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldProgress.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-a4750422"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-35c4fb4c"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,37 +1,38 @@
1
- import { defineComponent as d, ref as p, openBlock as g, createElementBlock as v, createElementVNode as o, normalizeStyle as _, unref as l, toDisplayString as y } from "vue";
2
- const x = { class: "of-field-progress" }, h = { class: "of-field-progress-bar" }, b = ["min", "max", "value"], N = { class: "of-field-progress-label" }, C = /* @__PURE__ */ d({
1
+ import { defineComponent as u, ref as p, openBlock as g, createElementBlock as v, createElementVNode as o, normalizeStyle as _, unref as t, toDisplayString as b } from "vue";
2
+ const y = { class: "of-field-progress" }, x = { class: "of-field-progress-bar" }, h = ["min", "max", "value", "aria-label"], N = { class: "of-field-progress-label" }, C = /* @__PURE__ */ u({
3
3
  __name: "FieldProgress",
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(r, { emit: c }) {
10
- const e = r, m = c, s = e.field.type === "progress" && "min" in e.field ? e.field.min ?? 0 : 0, n = e.field.type === "progress" && "max" in e.field ? e.field.max ?? 100 : 100, t = p(typeof e.value == "number" ? e.value : 0);
9
+ setup(s, { emit: c }) {
10
+ const e = s, m = c, n = e.field.type === "progress" && "min" in e.field ? e.field.min ?? 0 : 0, a = e.field.type === "progress" && "max" in e.field ? e.field.max ?? 100 : 100, l = p(typeof e.value == "number" ? e.value : 0);
11
11
  function f(i) {
12
- const a = i.target;
13
- t.value = Number(a.value);
12
+ const r = i.target;
13
+ l.value = Number(r.value);
14
14
  }
15
- function u() {
16
- m("commit", t.value);
15
+ function d() {
16
+ m("commit", l.value);
17
17
  }
18
- return (i, a) => (g(), v("div", x, [
19
- o("div", h, [
18
+ return (i, r) => (g(), v("div", y, [
19
+ o("div", x, [
20
20
  o("div", {
21
21
  class: "of-field-progress-fill",
22
- style: _({ width: `${(t.value - l(s)) / (l(n) - l(s)) * 100}%` })
22
+ style: _({ width: `${(l.value - t(n)) / (t(a) - t(n)) * 100}%` })
23
23
  }, null, 4)
24
24
  ]),
25
25
  o("input", {
26
26
  class: "of-field-progress-slider",
27
27
  type: "range",
28
- min: l(s),
29
- max: l(n),
30
- value: t.value,
28
+ min: t(n),
29
+ max: t(a),
30
+ value: l.value,
31
+ "aria-label": s.field.label,
31
32
  onInput: f,
32
- onChange: u
33
- }, null, 40, b),
34
- o("span", N, y(t.value) + "%", 1)
33
+ onChange: d
34
+ }, null, 40, h),
35
+ o("span", N, b(l.value) + "%", 1)
35
36
  ]));
36
37
  }
37
38
  });
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldRating.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-58a68101"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-40f59bfd"]]);
5
5
  export {
6
- m as default
6
+ i as default
7
7
  };
@@ -1,31 +1,37 @@
1
- import { defineComponent as v, ref as x, openBlock as o, createElementBlock as r, withKeys as _, Fragment as g, renderList as k, unref as u, withModifiers as y, normalizeClass as b } from "vue";
2
- const C = ["onMouseenter", "onClick"], $ = /* @__PURE__ */ v({
1
+ import { defineComponent as p, ref as b, openBlock as l, createElementBlock as r, withKeys as x, Fragment as $, renderList as g, unref as u, withModifiers as y, normalizeClass as k } from "vue";
2
+ const B = ["aria-label", "onMouseenter", "onFocus", "onClick"], F = /* @__PURE__ */ p({
3
3
  __name: "FieldRating",
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(c, { emit: m }) {
10
- const l = c, s = m, n = x(0), d = l.field.max ?? 5, f = Number(l.value ?? 0);
11
- function p(i) {
12
- s("commit", i);
9
+ setup(m, { emit: c }) {
10
+ const a = m, i = c, n = b(0), d = a.field.max ?? 5, v = Number(a.value ?? 0);
11
+ function f(s) {
12
+ i("commit", s);
13
13
  }
14
- return (i, t) => (o(), r("div", {
14
+ return (s, t) => (l(), r("div", {
15
15
  class: "of-field-rating",
16
- onKeydown: t[1] || (t[1] = _((e) => s("cancel"), ["escape"])),
17
- tabindex: "0"
16
+ tabindex: "0",
17
+ role: "radiogroup",
18
+ "aria-label": "评分",
19
+ onKeydown: t[2] || (t[2] = x((e) => i("cancel"), ["escape"]))
18
20
  }, [
19
- (o(!0), r(g, null, k(u(d), (e) => (o(), r("span", {
21
+ (l(!0), r($, null, g(u(d), (e) => (l(), r("button", {
20
22
  key: e,
21
- class: b(["of-field-rating__star", { filled: e <= (n.value || u(f)) }]),
22
- onMouseenter: (a) => n.value = e,
23
- onMouseleave: t[0] || (t[0] = (a) => n.value = 0),
24
- onClick: y((a) => p(e), ["stop"])
25
- }, "★", 42, C))), 128))
23
+ class: k(["of-field-rating__star", { filled: e <= (n.value || u(v)) }]),
24
+ type: "button",
25
+ "aria-label": `评分 ${e} 星`,
26
+ onMouseenter: (o) => n.value = e,
27
+ onMouseleave: t[0] || (t[0] = (o) => n.value = 0),
28
+ onFocus: (o) => n.value = e,
29
+ onBlur: t[1] || (t[1] = (o) => n.value = 0),
30
+ onClick: y((o) => f(e), ["stop"])
31
+ }, " ★ ", 42, B))), 128))
26
32
  ], 32));
27
33
  }
28
34
  });
29
35
  export {
30
- $ as default
36
+ F as default
31
37
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldRelation.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7af66606"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-30a94df6"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,21 +1,25 @@
1
- import { defineComponent as x, ref as i, computed as _, onMounted as b, nextTick as N, openBlock as r, createElementBlock as u, withDirectives as V, createElementVNode as f, vModelText as h, Fragment as D, renderList as C, createTextVNode as E, toDisplayString as M, createCommentVNode as T } from "vue";
1
+ import { defineComponent as b, ref as i, computed as x, onMounted as _, nextTick as h, openBlock as r, createElementBlock as u, withDirectives as N, createElementVNode as f, vModelText as V, Fragment as D, renderList as C, createTextVNode as E, toDisplayString as M, createCommentVNode as T } from "vue";
2
2
  const A = {
3
+ class: "of-field-relation",
4
+ role: "group",
5
+ "aria-label": "关联记录选择器"
6
+ }, B = ["aria-label"], F = {
3
7
  key: 0,
4
8
  class: "of-field-relation-tags"
5
- }, B = ["onClick"], w = /* @__PURE__ */ x({
9
+ }, R = ["onClick"], S = /* @__PURE__ */ b({
6
10
  __name: "FieldRelation",
7
11
  props: {
8
12
  value: { type: [String, Number, Boolean, Array, null] },
9
13
  field: {}
10
14
  },
11
15
  emits: ["commit", "cancel", "tabNext"],
12
- setup(m, { emit: d }) {
13
- const n = m, a = d, c = i(null), v = i(""), y = i(!1), t = i(
16
+ setup(c, { emit: m }) {
17
+ const n = c, a = m, v = i(null), d = i(""), y = i(!1), t = i(
14
18
  Array.isArray(n.value) ? n.value.filter((e) => typeof e == "string") : typeof n.value == "string" && n.value ? [n.value] : []
15
- ), p = _(() => n.field.type !== "relation" ? !1 : n.field.relationMode === "many_to_many");
16
- b(() => N(() => {
19
+ ), p = x(() => n.field.type !== "relation" ? !1 : n.field.relationMode === "many_to_many");
20
+ _(() => h(() => {
17
21
  var e;
18
- return (e = c.value) == null ? void 0 : e.focus();
22
+ return (e = v.value) == null ? void 0 : e.focus();
19
23
  }));
20
24
  function g(e) {
21
25
  if (p.value) {
@@ -30,22 +34,21 @@ const A = {
30
34
  function k(e) {
31
35
  e.key === "Escape" && (e.preventDefault(), a("cancel")), e.key === "Enter" && (e.preventDefault(), s()), e.key === "Tab" && (e.preventDefault(), s(), a("tabNext"));
32
36
  }
33
- return (e, l) => (r(), u("div", {
34
- class: "of-field-relation",
35
- onKeydown: k
36
- }, [
37
- V(f("input", {
37
+ return (e, l) => (r(), u("div", A, [
38
+ N(f("input", {
38
39
  ref_key: "inputRef",
39
- ref: c,
40
+ ref: v,
41
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => d.value = o),
40
42
  class: "of-field-relation-search",
41
43
  type: "text",
42
- "onUpdate:modelValue": l[0] || (l[0] = (o) => v.value = o),
44
+ "aria-label": c.field.label,
43
45
  placeholder: "搜索关联记录...",
44
- onFocus: l[1] || (l[1] = (o) => y.value = !0)
45
- }, null, 544), [
46
- [h, v.value]
46
+ onFocus: l[1] || (l[1] = (o) => y.value = !0),
47
+ onKeydown: k
48
+ }, null, 40, B), [
49
+ [V, d.value]
47
50
  ]),
48
- t.value.length > 0 ? (r(), u("div", A, [
51
+ t.value.length > 0 ? (r(), u("div", F, [
49
52
  (r(!0), u(D, null, C(t.value, (o) => (r(), u("span", {
50
53
  key: o,
51
54
  class: "of-field-relation-tag"
@@ -54,14 +57,14 @@ const A = {
54
57
  f("button", {
55
58
  type: "button",
56
59
  class: "of-field-relation-tag-remove",
57
- onClick: (F) => g(o)
58
- }, " × ", 8, B)
60
+ onClick: (w) => g(o)
61
+ }, " × ", 8, R)
59
62
  ]))), 128))
60
63
  ])) : T("", !0),
61
64
  l[2] || (l[2] = f("div", { class: "of-field-relation-hint" }, "关联记录选择器(需由消费方通过 slot 提供数据源)", -1))
62
- ], 32));
65
+ ]));
63
66
  }
64
67
  });
65
68
  export {
66
- w as default
69
+ S as default
67
70
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldRichText.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-b9f87e2f"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-062bed7a"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as p, ref as d, onMounted as b, nextTick as x, openBlock as y, createElementBlock as M, createElementVNode as n, withModifiers as r } from "vue";
1
+ import { defineComponent as p, ref as a, onMounted as b, nextTick as x, openBlock as y, createElementBlock as M, createElementVNode as n, withModifiers as u } from "vue";
2
2
  const k = { class: "of-field-richtext" }, w = { class: "of-field-richtext-toolbar" }, T = /* @__PURE__ */ p({
3
3
  __name: "FieldRichText",
4
4
  props: {
@@ -6,8 +6,8 @@ const k = { class: "of-field-richtext" }, w = { class: "of-field-richtext-toolba
6
6
  field: {}
7
7
  },
8
8
  emits: ["commit", "cancel", "tabNext"],
9
- setup(a, { emit: c }) {
10
- const s = a, l = c, o = d(null), i = d(typeof s.value == "string" ? s.value : "");
9
+ setup(d, { emit: c }) {
10
+ const s = d, l = c, o = a(null), i = a(typeof s.value == "string" ? s.value : "");
11
11
  b(
12
12
  () => x(() => {
13
13
  o.value && (o.value.innerHTML = i.value, o.value.focus());
@@ -21,7 +21,7 @@ const k = { class: "of-field-richtext" }, w = { class: "of-field-richtext-toolba
21
21
  var t;
22
22
  l("commit", ((t = o.value) == null ? void 0 : t.innerHTML) ?? i.value);
23
23
  }
24
- function u(t) {
24
+ function r(t) {
25
25
  var e;
26
26
  document.execCommand(t, !1), (e = o.value) == null || e.focus();
27
27
  }
@@ -30,21 +30,21 @@ const k = { class: "of-field-richtext" }, w = { class: "of-field-richtext-toolba
30
30
  n("button", {
31
31
  type: "button",
32
32
  class: "of-field-richtext-btn",
33
- onMousedown: e[0] || (e[0] = r((f) => u("bold"), ["prevent"]))
33
+ onMousedown: e[0] || (e[0] = u((f) => r("bold"), ["prevent"]))
34
34
  }, [...e[3] || (e[3] = [
35
35
  n("strong", null, "B", -1)
36
36
  ])], 32),
37
37
  n("button", {
38
38
  type: "button",
39
39
  class: "of-field-richtext-btn",
40
- onMousedown: e[1] || (e[1] = r((f) => u("italic"), ["prevent"]))
40
+ onMousedown: e[1] || (e[1] = u((f) => r("italic"), ["prevent"]))
41
41
  }, [...e[4] || (e[4] = [
42
42
  n("em", null, "I", -1)
43
43
  ])], 32),
44
44
  n("button", {
45
45
  type: "button",
46
46
  class: "of-field-richtext-btn",
47
- onMousedown: e[2] || (e[2] = r((f) => u("underline"), ["prevent"]))
47
+ onMousedown: e[2] || (e[2] = u((f) => r("underline"), ["prevent"]))
48
48
  }, [...e[5] || (e[5] = [
49
49
  n("u", null, "U", -1)
50
50
  ])], 32)
@@ -54,6 +54,9 @@ const k = { class: "of-field-richtext" }, w = { class: "of-field-richtext-toolba
54
54
  ref: o,
55
55
  class: "of-field-richtext-editor",
56
56
  contenteditable: "true",
57
+ role: "textbox",
58
+ "aria-multiline": "true",
59
+ tabindex: "0",
57
60
  onKeydown: m,
58
61
  onBlur: v
59
62
  }, null, 544)
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldSelect.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-602f7b18"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-31d8cba6"]]);
5
5
  export {
6
- m as default
6
+ c as default
7
7
  };