hys-ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +15 -1
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
- package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
- package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
- package/dist/components/HysCascader/HysCascader.vue.js +2 -2
- package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
- package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +112 -100
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +490 -85
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +730 -594
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
- package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
- package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +389 -368
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +46 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
- package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
- package/dist/components/HysTree/HysTree.vue.js +2 -2
- package/dist/components/HysTree/HysTree2.vue.js +195 -184
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +19 -17
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +110 -76
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/index.js +27 -24
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +1 -1
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -1
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +13 -4
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +2 -2
- package/dist/types/components/HysTable/HysTable.vue.d.ts +4 -4
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -1
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
- package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +3 -0
- package/dist/types/composables/avatar.d.ts +3 -0
- package/dist/types/composables/cascader.d.ts +3 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +3 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/formContext.d.ts +2 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +183 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/selectOptions.d.ts +2 -0
- package/dist/types/composables/table.d.ts +3 -0
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/transfer.d.ts +7 -0
- package/dist/types/composables/tree.d.ts +3 -0
- package/dist/types/composables/treeSelect.d.ts +3 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +1 -1
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +21 -2
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/index.d.ts +17 -2
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysMention2.vue.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-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5a985c13"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as ae, useModel as oe, ref as b, useId as le, computed as C, watch as D, onBeforeUnmount as ne, onDeactivated as ie, openBlock as M, createElementBlock as S, mergeProps as O, unref as l, withDirectives as re, createElementVNode as A, vModelText as se, createBlock as de, Teleport as ue, createVNode as pe, withCtx as ce, Fragment as ve, renderList as fe, withModifiers as he, normalizeClass as me, renderSlot as ge, toDisplayString as U, createCommentVNode as be, mergeModels as K, nextTick as j } from "vue";
|
|
2
|
+
import ye from "../../motion/PopupMotion.js";
|
|
3
|
+
import { useHysControlState as xe } from "../../composables/formContext.js";
|
|
4
|
+
import { useHysRootAttrs as we } from "../../config.js";
|
|
5
|
+
import { useFloating as ke } from "../../composables/useFloating.js";
|
|
6
|
+
const Ce = ["placeholder", "disabled", "readonly", "maxlength", "aria-label", "aria-controls", "aria-expanded", "aria-activedescendant"], Me = ["id"], Le = ["id", "disabled", "aria-selected", "data-active", "onPointerenter", "onClick"], Te = {
|
|
6
7
|
class: "hys-ui-mention-avatar",
|
|
7
8
|
"aria-hidden": "true"
|
|
8
|
-
},
|
|
9
|
+
}, Re = /* @__PURE__ */ ae({
|
|
9
10
|
__name: "HysMention",
|
|
10
11
|
props: /* @__PURE__ */ K({
|
|
12
|
+
popupTransition: {},
|
|
13
|
+
popupTransitionDuration: {},
|
|
11
14
|
users: {},
|
|
12
15
|
placeholder: {},
|
|
13
16
|
disabled: { type: Boolean },
|
|
@@ -20,147 +23,156 @@ const ye = ["placeholder", "disabled", "readonly", "maxlength", "aria-label", "a
|
|
|
20
23
|
}),
|
|
21
24
|
emits: /* @__PURE__ */ K(["select", "change"], ["update:modelValue"]),
|
|
22
25
|
setup(h, { expose: q, emit: J }) {
|
|
23
|
-
const
|
|
26
|
+
const m = h, { disabled: F, label: G } = xe(m), r = oe(h, "modelValue"), V = J, z = we(), n = b(0), p = b(!1), R = b(!1), s = b(), $ = b(), L = b(r.value.length), T = le(), Q = C(() => s.value ? { getBoundingClientRect: _, contains: (e) => {
|
|
24
27
|
var t;
|
|
25
|
-
return !!((t =
|
|
28
|
+
return !!((t = s.value) != null && t.contains(e));
|
|
26
29
|
}, focus: () => {
|
|
27
30
|
var e;
|
|
28
|
-
return (e =
|
|
31
|
+
return (e = s.value) == null ? void 0 : e.focus();
|
|
29
32
|
}, get isConnected() {
|
|
30
33
|
var e;
|
|
31
|
-
return !!((e =
|
|
32
|
-
} } : void 0), { open:
|
|
34
|
+
return !!((e = s.value) != null && e.isConnected);
|
|
35
|
+
} } : void 0), { placement: X, open: c, style: Y, show: H, close: y, update: Z } = ke(Q, $, { gap: 6 }), E = C(() => r.value.slice(0, L.value)), P = C(() => {
|
|
33
36
|
var e;
|
|
34
37
|
return ((e = E.value.match(/@([^\s@]*)$/)) == null ? void 0 : e[1]) ?? null;
|
|
35
38
|
});
|
|
36
39
|
let i;
|
|
37
|
-
function
|
|
40
|
+
function W() {
|
|
38
41
|
i == null || i.remove(), i = void 0;
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
const e =
|
|
43
|
+
function _() {
|
|
44
|
+
const e = s.value, t = e.getBoundingClientRect();
|
|
42
45
|
if (!t.width && !t.height) return t;
|
|
43
|
-
const
|
|
46
|
+
const o = getComputedStyle(e);
|
|
44
47
|
i || (i = document.createElement("div"), i.setAttribute("aria-hidden", "true"), document.body.append(i));
|
|
45
|
-
for (const N of ["direction", "font", "font-family", "font-size", "font-weight", "font-style", "font-variant", "letter-spacing", "word-spacing", "text-transform", "text-indent", "text-align", "line-height", "padding-top", "padding-right", "padding-bottom", "padding-left", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-style", "box-sizing", "tab-size"]) i.style.setProperty(N,
|
|
46
|
-
Object.assign(i.style, { position: "fixed", top: "0px", left: "-10000px", visibility: "hidden", pointerEvents: "none", height: "auto", overflow: "hidden", whiteSpace: e.wrap === "off" ? "pre" : "pre-wrap", overflowWrap: "break-word", wordBreak:
|
|
47
|
-
const a = parseFloat(
|
|
48
|
-
i.style.width = (e.clientWidth || t.width - a - (parseFloat(
|
|
48
|
+
for (const N of ["direction", "font", "font-family", "font-size", "font-weight", "font-style", "font-variant", "letter-spacing", "word-spacing", "text-transform", "text-indent", "text-align", "line-height", "padding-top", "padding-right", "padding-bottom", "padding-left", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-style", "box-sizing", "tab-size"]) i.style.setProperty(N, o.getPropertyValue(N));
|
|
49
|
+
Object.assign(i.style, { position: "fixed", top: "0px", left: "-10000px", visibility: "hidden", pointerEvents: "none", height: "auto", overflow: "hidden", whiteSpace: e.wrap === "off" ? "pre" : "pre-wrap", overflowWrap: "break-word", wordBreak: o.wordBreak });
|
|
50
|
+
const a = parseFloat(o.borderLeftWidth) || 0, v = parseFloat(o.borderTopWidth) || 0;
|
|
51
|
+
i.style.width = (e.clientWidth || t.width - a - (parseFloat(o.borderRightWidth) || 0)) + a + (parseFloat(o.borderRightWidth) || 0) + "px";
|
|
49
52
|
const u = Math.max(0, E.value.lastIndexOf("@"));
|
|
50
53
|
i.textContent = r.value.slice(0, u);
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
return { x:
|
|
54
|
+
const f = document.createElement("span");
|
|
55
|
+
f.textContent = r.value.slice(u) || "@", i.append(f);
|
|
56
|
+
const k = parseFloat(o.lineHeight) || (parseFloat(o.fontSize) || 14) * 1.6, g = t.left + f.offsetLeft + a - e.scrollLeft, B = t.top + f.offsetTop + v - e.scrollTop;
|
|
57
|
+
return { x: g, y: B, left: g, top: B, right: g + 1, bottom: B + k, width: 1, height: k, toJSON: () => ({ left: g, top: B, width: 1, height: k }) };
|
|
55
58
|
}
|
|
56
|
-
D(
|
|
57
|
-
e ||
|
|
58
|
-
}),
|
|
59
|
-
const
|
|
60
|
-
D(
|
|
61
|
-
n.value = 0,
|
|
62
|
-
}), D(
|
|
63
|
-
n.value = Math.min(n.value, Math.max(0,
|
|
59
|
+
D(c, (e) => {
|
|
60
|
+
e || W();
|
|
61
|
+
}), ne(W), ie(W);
|
|
62
|
+
const x = C(() => P.value === null || F.value || m.readonly || p.value || !R.value ? [] : m.users.filter((e) => e.name.toLocaleLowerCase().includes(P.value.toLocaleLowerCase())).slice(0, 8)), d = C(() => x.value.filter((e) => !e.disabled));
|
|
63
|
+
D(P, () => {
|
|
64
|
+
n.value = 0, p.value = !1;
|
|
65
|
+
}), D(x, (e) => {
|
|
66
|
+
n.value = Math.min(n.value, Math.max(0, d.value.length - 1)), e.length ? H() : y();
|
|
64
67
|
}, { flush: "post" });
|
|
65
|
-
async function
|
|
68
|
+
async function w() {
|
|
66
69
|
var e;
|
|
67
|
-
await j(), L.value = ((e =
|
|
70
|
+
await j(), L.value = ((e = s.value) == null ? void 0 : e.selectionStart) ?? r.value.length, c.value && Z();
|
|
68
71
|
}
|
|
69
|
-
D(r, () => void
|
|
70
|
-
async function
|
|
71
|
-
var
|
|
72
|
-
if (!e || e.disabled ||
|
|
73
|
-
const t = E.value.replace(/@[^\s@]*$/, "@" + e.name + " "),
|
|
74
|
-
r.value = t + a,
|
|
72
|
+
D(r, () => void w(), { flush: "post" });
|
|
73
|
+
async function I(e) {
|
|
74
|
+
var v, u;
|
|
75
|
+
if (!e || e.disabled || F.value || m.readonly) return;
|
|
76
|
+
const t = E.value.replace(/@[^\s@]*$/, "@" + e.name + " "), o = r.value.slice(L.value), a = o.startsWith(" ") ? o.slice(1) : o;
|
|
77
|
+
r.value = t + a, p.value = !0, n.value = 0, y(), V("select", e), V("change", r.value), await j(), (v = s.value) == null || v.focus(), (u = s.value) == null || u.setSelectionRange(t.length, t.length), L.value = t.length;
|
|
75
78
|
}
|
|
76
|
-
function
|
|
77
|
-
var t,
|
|
79
|
+
function ee(e) {
|
|
80
|
+
var t, o;
|
|
78
81
|
if (e.key === "Tab") {
|
|
79
|
-
|
|
82
|
+
p.value = !0, y();
|
|
80
83
|
return;
|
|
81
84
|
}
|
|
82
|
-
|
|
85
|
+
x.value.length && (e.key === "Escape" ? (e.preventDefault(), p.value = !0, y()) : e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), c.value ? n.value = (n.value + (e.key === "ArrowDown" ? 1 : -1) + Math.max(1, d.value.length)) % Math.max(1, d.value.length) : H(), (o = (t = $.value) == null ? void 0 : t.querySelector('[data-active="true"]')) == null || o.scrollIntoView({ block: "nearest" })) : e.key === "Enter" && !e.isComposing && d.value[n.value] && (e.preventDefault(), I(d.value[n.value])));
|
|
83
86
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
87
|
+
function te() {
|
|
88
|
+
p.value = !1, w(), V("change", r.value);
|
|
86
89
|
}
|
|
87
90
|
return q({ focus: () => {
|
|
88
91
|
var e;
|
|
89
|
-
return (e =
|
|
92
|
+
return (e = s.value) == null ? void 0 : e.focus();
|
|
90
93
|
}, blur: () => {
|
|
91
94
|
var e;
|
|
92
|
-
return (e =
|
|
95
|
+
return (e = s.value) == null ? void 0 : e.blur();
|
|
93
96
|
} }), (e, t) => {
|
|
94
|
-
var
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
+
var o;
|
|
98
|
+
return M(), S("div", O(l(z), { class: "hys-ui-ent-mention" }), [
|
|
99
|
+
re(A("textarea", {
|
|
97
100
|
ref_key: "input",
|
|
98
|
-
ref:
|
|
101
|
+
ref: s,
|
|
99
102
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => r.value = a),
|
|
100
103
|
placeholder: h.placeholder || "输入 @ 提及成员",
|
|
101
|
-
disabled:
|
|
104
|
+
disabled: l(F),
|
|
102
105
|
readonly: h.readonly,
|
|
103
106
|
maxlength: h.maxlength,
|
|
104
|
-
"aria-label": h.ariaLabel ||
|
|
105
|
-
"aria-controls":
|
|
106
|
-
"aria-expanded":
|
|
107
|
-
"aria-activedescendant":
|
|
107
|
+
"aria-label": h.ariaLabel || l(G) || "提及输入",
|
|
108
|
+
"aria-controls": l(c) ? l(T) : void 0,
|
|
109
|
+
"aria-expanded": l(c),
|
|
110
|
+
"aria-activedescendant": l(c) ? l(T) + "-" + ((o = d.value[n.value]) == null ? void 0 : o.id) : void 0,
|
|
108
111
|
role: "combobox",
|
|
109
|
-
onKeydown:
|
|
110
|
-
onKeyup:
|
|
112
|
+
onKeydown: ee,
|
|
113
|
+
onKeyup: w,
|
|
111
114
|
onClick: t[1] || (t[1] = (a) => {
|
|
112
|
-
|
|
115
|
+
p.value = !1, w();
|
|
113
116
|
}),
|
|
114
117
|
onFocus: t[2] || (t[2] = (a) => {
|
|
115
|
-
|
|
118
|
+
R.value = !0, w();
|
|
116
119
|
}),
|
|
117
120
|
onBlur: t[3] || (t[3] = (a) => {
|
|
118
|
-
|
|
121
|
+
R.value = !1, l(y)();
|
|
119
122
|
}),
|
|
120
|
-
onInput:
|
|
121
|
-
}, null, 40,
|
|
122
|
-
[
|
|
123
|
+
onInput: te
|
|
124
|
+
}, null, 40, Ce), [
|
|
125
|
+
[se, r.value]
|
|
123
126
|
]),
|
|
124
|
-
(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
127
|
+
(M(), de(ue, { to: "body" }, [
|
|
128
|
+
pe(l(ye), {
|
|
129
|
+
"popup-transition": m.popupTransition,
|
|
130
|
+
"popup-transition-duration": m.popupTransitionDuration,
|
|
131
|
+
placement: l(X)
|
|
132
|
+
}, {
|
|
133
|
+
default: ce(() => [
|
|
134
|
+
l(c) && x.value.length ? (M(), S("div", O({
|
|
135
|
+
key: 0,
|
|
136
|
+
id: l(T),
|
|
137
|
+
ref_key: "panel",
|
|
138
|
+
ref: $
|
|
139
|
+
}, l(z), {
|
|
140
|
+
class: "hys-ui-mention-list hys-ui-floating-surface",
|
|
141
|
+
style: { ...l(Y), maxHeight: "min(240px,calc(100vh - 20px))" },
|
|
142
|
+
role: "listbox",
|
|
143
|
+
"aria-label": "提及候选成员"
|
|
144
|
+
}), [
|
|
145
|
+
(M(!0), S(ve, null, fe(x.value, (a) => {
|
|
146
|
+
var v, u, f;
|
|
147
|
+
return M(), S("button", {
|
|
148
|
+
id: l(T) + "-" + a.id,
|
|
149
|
+
key: a.id,
|
|
150
|
+
type: "button",
|
|
151
|
+
role: "option",
|
|
152
|
+
disabled: a.disabled,
|
|
153
|
+
"aria-selected": ((v = d.value[n.value]) == null ? void 0 : v.id) === a.id,
|
|
154
|
+
"data-active": ((u = d.value[n.value]) == null ? void 0 : u.id) === a.id,
|
|
155
|
+
class: me({ "hys-ui-mention-active": ((f = d.value[n.value]) == null ? void 0 : f.id) === a.id }),
|
|
156
|
+
onMousedown: t[4] || (t[4] = he(() => {
|
|
157
|
+
}, ["prevent"])),
|
|
158
|
+
onPointerenter: (k) => !a.disabled && (n.value = d.value.findIndex((g) => g.id === a.id)),
|
|
159
|
+
onClick: (k) => I(a)
|
|
160
|
+
}, [
|
|
161
|
+
ge(e.$slots, "option", { user: a }, () => [
|
|
162
|
+
A("span", Te, U(a.name.slice(0, 1)), 1),
|
|
163
|
+
A("span", null, U(a.name), 1)
|
|
164
|
+
], !0)
|
|
165
|
+
], 42, Le);
|
|
166
|
+
}), 128))
|
|
167
|
+
], 16, Me)) : be("", !0)
|
|
168
|
+
]),
|
|
169
|
+
_: 3
|
|
170
|
+
}, 8, ["popup-transition", "popup-transition-duration", "placement"])
|
|
159
171
|
]))
|
|
160
172
|
], 16);
|
|
161
173
|
};
|
|
162
174
|
}
|
|
163
175
|
});
|
|
164
176
|
export {
|
|
165
|
-
|
|
177
|
+
Re as default
|
|
166
178
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysModal2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const p = /* @__PURE__ */
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-401a39a8"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|