eco-vue-js 0.11.54 → 0.11.56
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AAoQA;AA4mBA,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AActD,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAA;yBAE9B,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAy2BO,mBAAmB,CAAC,oCAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;qBArpB7B,IAAI;oBAOL,IAAI;+BAyES,aAAa;0BAxOlB,MAAM,QAAQ,MAAM,KAAG,IAAI;wBAR/B,WAAW;;;oBAkDf,IAAI;oBAgBJ,IAAI;MAmvBgD,GAAG,IAAI;WACpE,GAAG;;uBAjEgB,GAAG;0BACA,GAAG;wBACJ,GAAG;;;YAGH,GAAG;;;YAFH,GAAG;;;YAGH,GAAG;;mCA3gBF,aAAa;YAygBb,GAAG;uBAGL,GAAG;;;;YACF,GAAG;uBACJ,GAAG;uBACH,GAAG;wBACF,GAAG;;;YA1xB1B,oBAAoB,SAAS,4CAAa,SAAS,GAAG,IAAI;YAC1D,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;EAw0BhB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAp3BzE,wBAo3B4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -2,12 +2,17 @@ import { defineComponent, defineAsyncComponent, useTemplateRef, ref, watch, next
|
|
|
2
2
|
import _sfc_main$1 from '../FieldWrapper/WFieldWrapper.vue.js';
|
|
3
3
|
import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
|
|
4
4
|
import { Notify } from '../../utils/Notify.js';
|
|
5
|
+
import { getIsMobile } from '../../utils/mobile.js';
|
|
5
6
|
import { useComponentStates } from '../../utils/useComponentStates.js';
|
|
6
7
|
import { checkPermissionPaste } from '../../utils/useCopy.js';
|
|
7
8
|
import { debounce } from '../../utils/utils.js';
|
|
8
9
|
import _sfc_main$2 from './components/InputActions.vue.js';
|
|
9
10
|
|
|
10
11
|
const _hoisted_1 = { class: "relative flex min-h-full flex-1" };
|
|
12
|
+
const _hoisted_2 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "text-description pointer-events-none absolute"
|
|
15
|
+
};
|
|
11
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
17
|
...{ inheritAttrs: false },
|
|
13
18
|
__name: "WInput",
|
|
@@ -82,10 +87,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
87
|
if ("getCaret" in inputRef.value) return inputRef.value.getCaret();
|
|
83
88
|
return { start: inputRef.value.selectionStart ?? 0, end: inputRef.value.selectionEnd ?? 0 };
|
|
84
89
|
};
|
|
90
|
+
const noSelectionTypes = ["email", "number", "date"];
|
|
85
91
|
const setCaret = (start, end) => {
|
|
86
92
|
if (!inputRef.value) return;
|
|
87
93
|
if ("setCaret" in inputRef.value) inputRef.value.setCaret(start, end);
|
|
88
|
-
else
|
|
94
|
+
else {
|
|
95
|
+
const previousType = inputRef.value.type;
|
|
96
|
+
if (noSelectionTypes.includes(previousType)) {
|
|
97
|
+
if (getIsMobile()) return;
|
|
98
|
+
inputRef.value.type = "text";
|
|
99
|
+
inputRef.value.setSelectionRange(start, end ?? start);
|
|
100
|
+
inputRef.value.type = previousType;
|
|
101
|
+
} else {
|
|
102
|
+
inputRef.value.setSelectionRange(start, end ?? start);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
89
105
|
};
|
|
90
106
|
const addToHistory = (value, noDebounce) => {
|
|
91
107
|
if (history.value.length === 0) {
|
|
@@ -412,6 +428,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
412
428
|
}, [
|
|
413
429
|
createElementVNode("div", _hoisted_1, [
|
|
414
430
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ modelValue: _ctx.modelValue }))),
|
|
431
|
+
_ctx.placeholder && _ctx.textarea && !_ctx.modelValue && !_ctx.textParts?.length ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(_ctx.placeholder), 1)) : createCommentVNode("", true),
|
|
415
432
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.textarea ? unref(ContentEditable) : "input"), {
|
|
416
433
|
id,
|
|
417
434
|
ref: "input",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAeA;AAwUA,OAAO,KAAK,EAAC,QAAQ,EAAG,aAAa,EAAC,MAAM,UAAU,CAAA;AAStD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAC;;;;2BAmJ4B,aAAa,KAAG,IAAI;2BATpB,MAAM,aAAa,MAAM;;wBAhB5B,MAAM;;;;;;;;;;;;;;;AAsPjC,wBAUG"}
|
|
@@ -3,7 +3,7 @@ import { WrapSelectionType } from '../../../utils/utils.js';
|
|
|
3
3
|
import { preserveIndentation } from '../models/toolbarActions.js';
|
|
4
4
|
import { getCaretOffset, setCaretOffset } from '../models/utils.js';
|
|
5
5
|
|
|
6
|
-
const _hoisted_1 = ["contenteditable"
|
|
6
|
+
const _hoisted_1 = ["contenteditable"];
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "ContentEditable",
|
|
9
9
|
props: {
|
|
@@ -249,7 +249,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
249
249
|
role: "textbox",
|
|
250
250
|
"aria-multiline": "true",
|
|
251
251
|
spellcheck: "false",
|
|
252
|
-
placeholder: _ctx.placeholder,
|
|
253
252
|
class: "relative [white-space:var(--w-input-whitespace,pre)]",
|
|
254
253
|
onInput,
|
|
255
254
|
onBeforeinput: _cache[0] || (_cache[0] = ($event) => insertParagraph($event)),
|