vft 0.0.387 → 0.0.388
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/es/components/select/select.vue2.js +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/select/select.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/web-types.json +1 -1
- package/es/utils/click-out-side.d.ts +0 -3
- package/es/utils/click-out-side.js +0 -43
- package/lib/utils/click-out-side.cjs +0 -1
- package/lib/utils/click-out-side.d.ts +0 -3
|
@@ -10,7 +10,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
12
|
import { useCalcInputWidth as y } from "../../hooks/use-calc-input-width/index.js";
|
|
13
|
-
import g from "
|
|
13
|
+
import { ClickOutside as g } from "@vft/directives";
|
|
14
14
|
import { selectV2Emits as h, selectV2Props as I } from "./defaults.js";
|
|
15
15
|
import K from "./select-dropdown.js";
|
|
16
16
|
import { selectV2InjectionKey as R } from "./token.js";
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("../icon/index.cjs"),f=require("../tag/index.cjs"),q=require("../tooltip/index.cjs");require("@vueuse/core");const m=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");const t=require("vue");require("lodash-es");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const v=require("../../hooks/use-calc-input-width/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("../icon/index.cjs"),f=require("../tag/index.cjs"),q=require("../tooltip/index.cjs");require("@vueuse/core");const m=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");const t=require("vue");require("lodash-es");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const v=require("../../hooks/use-calc-input-width/index.cjs"),b=require("@vft/directives"),u=require("./defaults.cjs"),S=require("./select-dropdown.cjs"),V=require("./token.cjs"),g=require("./useSelect.cjs"),y=t.defineComponent({name:"VftSelect",components:{SelectMenu:S.default,Tag:f.VftTag,Tooltip:q.VftTooltip,Icon:p.VftIcon},directives:{ClickOutside:b.ClickOutside},props:u.selectV2Props,emits:u.selectV2Emits,setup(r,{emit:l}){const i=t.computed(()=>{const{modelValue:o,multiple:n}=r,c=n?[]:void 0;return m.isArray(o)?n?o:c:n?c:o}),e=g.default(t.reactive({...t.toRefs(r),modelValue:i}),l),{calculatorRef:s,inputStyle:a}=v.useCalcInputWidth();t.provide(V.selectV2InjectionKey,{props:t.reactive({...t.toRefs(r),height:e.popupHeight,modelValue:i}),expanded:e.expanded,tooltipRef:e.tooltipRef,onSelect:e.onSelect,onHover:e.onHover,onKeyboardNavigate:e.onKeyboardNavigate,onKeyboardSelect:e.onKeyboardSelect});const d=t.computed(()=>r.multiple?e.states.cachedOptions.map(o=>o.label):e.states.selectedLabel);return{...e,modelValue:i,selectedLabel:d,calculatorRef:s,inputStyle:a}}});exports.default=y;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.388";exports.version=e;
|
package/lib/package.json.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.388",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"resize-detector": "0.3.0",
|
|
56
56
|
"sortablejs": "1.15.0",
|
|
57
57
|
"photoswipe": "5.4.4",
|
|
58
|
-
"@vft/constants": "0.0.72",
|
|
59
58
|
"@vft/router": "0.0.67",
|
|
60
|
-
"@vft/
|
|
59
|
+
"@vft/constants": "0.0.72",
|
|
61
60
|
"@vft/store": "0.0.54",
|
|
62
|
-
"@vft/
|
|
63
|
-
"@vft/directives": "0.0.
|
|
61
|
+
"@vft/utils": "0.0.140",
|
|
62
|
+
"@vft/directives": "0.0.36",
|
|
63
|
+
"@vft/use": "0.0.82"
|
|
64
64
|
},
|
|
65
65
|
"vetur": {
|
|
66
66
|
"tags": "tags.json",
|
package/web-types.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"http://json.schemastore.org/web-types","framework":"vue","name":"vft","version":"0.0.
|
|
1
|
+
{"$schema":"http://json.schemastore.org/web-types","framework":"vue","name":"vft","version":"0.0.388","js-types-syntax":"typescript","description-markup":"markdown","contributions":{"html":{}}}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { isArray as x, isElement as E } from "@vft/utils";
|
|
2
|
-
const s = /* @__PURE__ */ new Map();
|
|
3
|
-
let u;
|
|
4
|
-
document.addEventListener("mousedown", (e) => u = e);
|
|
5
|
-
document.addEventListener("mouseup", (e) => {
|
|
6
|
-
if (u) {
|
|
7
|
-
for (const t of s.values())
|
|
8
|
-
for (const { documentHandler: n } of t)
|
|
9
|
-
n(e, u);
|
|
10
|
-
u = void 0;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
function i(e, t) {
|
|
14
|
-
let n = [];
|
|
15
|
-
return x(t.arg) ? n = t.arg : E(t.arg) && n.push(t.arg), function(o, a) {
|
|
16
|
-
const c = t.instance.popperRef, r = o.target, d = a?.target, l = !t || !t.instance, f = !r || !d, p = e.contains(r) || e.contains(d), m = e === r, h = n.length && n.some((v) => v?.contains(r)) || n.length && n.includes(d), g = c && (c.contains(r) || c.contains(d));
|
|
17
|
-
l || f || p || m || h || g || t.value(o, a);
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const C = {
|
|
21
|
-
beforeMount(e, t) {
|
|
22
|
-
s.has(e) || s.set(e, []), s.get(e).push({
|
|
23
|
-
documentHandler: i(e, t),
|
|
24
|
-
bindingFn: t.value
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
updated(e, t) {
|
|
28
|
-
s.has(e) || s.set(e, []);
|
|
29
|
-
const n = s.get(e), o = n.findIndex(
|
|
30
|
-
(c) => c.bindingFn === t.oldValue
|
|
31
|
-
), a = {
|
|
32
|
-
documentHandler: i(e, t),
|
|
33
|
-
bindingFn: t.value
|
|
34
|
-
};
|
|
35
|
-
o >= 0 ? n.splice(o, 1, a) : n.push(a);
|
|
36
|
-
},
|
|
37
|
-
unmounted(e) {
|
|
38
|
-
s.delete(e);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
C as default
|
|
43
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@vft/utils"),s=new Map;let d;document.addEventListener("mousedown",e=>d=e);document.addEventListener("mouseup",e=>{if(d){for(const t of s.values())for(const{documentHandler:n}of t)n(e,d);d=void 0}});function i(e,t){let n=[];return l.isArray(t.arg)?n=t.arg:l.isElement(t.arg)&&n.push(t.arg),function(o,a){const c=t.instance.popperRef,r=o.target,u=a?.target,f=!t||!t.instance,p=!r||!u,m=e.contains(r)||e.contains(u),g=e===r,h=n.length&&n.some(E=>E?.contains(r))||n.length&&n.includes(u),v=c&&(c.contains(r)||c.contains(u));f||p||m||g||h||v||t.value(o,a)}}const H={beforeMount(e,t){s.has(e)||s.set(e,[]),s.get(e).push({documentHandler:i(e,t),bindingFn:t.value})},updated(e,t){s.has(e)||s.set(e,[]);const n=s.get(e),o=n.findIndex(c=>c.bindingFn===t.oldValue),a={documentHandler:i(e,t),bindingFn:t.value};o>=0?n.splice(o,1,a):n.push(a)},unmounted(e){s.delete(e)}};exports.default=H;
|