bt-core-app 2.2.3 → 2.2.5
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/dist/_virtual/VAlert.sass.mjs +1 -0
- package/dist/_virtual/VAvatar.sass.mjs +1 -0
- package/dist/_virtual/VBtn.sass.mjs +1 -0
- package/dist/_virtual/VBtnGroup.sass.mjs +1 -0
- package/dist/_virtual/VBtnToggle.sass.mjs +1 -0
- package/dist/_virtual/VCard.sass.mjs +1 -0
- package/dist/_virtual/VDivider.sass.mjs +1 -0
- package/dist/_virtual/VIcon.sass.mjs +1 -0
- package/dist/_virtual/VImg.sass.mjs +1 -0
- package/dist/_virtual/VList.sass.mjs +1 -0
- package/dist/_virtual/VListItem.sass.mjs +1 -0
- package/dist/_virtual/VMenu.sass.mjs +1 -0
- package/dist/_virtual/VOverlay.sass.mjs +1 -0
- package/dist/_virtual/VProgressCircular.sass.mjs +1 -0
- package/dist/_virtual/VProgressLinear.sass.mjs +1 -0
- package/dist/_virtual/VResponsive.sass.mjs +1 -0
- package/dist/_virtual/VRipple.sass.mjs +1 -0
- package/dist/_virtual/VToolbar.sass.mjs +1 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VAlert/VAlert.mjs +196 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VAlert/VAlertTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VAvatar/VAvatar.mjs +92 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs +220 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtnGroup/VBtnGroup.mjs +68 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs +57 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs +180 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardActions.mjs +32 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardItem.mjs +118 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardSubtitle.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardText.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +39 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VDivider/VDivider.mjs +82 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VIcon/VIcon.mjs +77 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VImg/VImg.mjs +248 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VList.mjs +281 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListChildren.mjs +104 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListGroup.mjs +129 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs +312 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListItemSubtitle.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListItemTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListSubheader.mjs +50 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/list.mjs +38 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VMenu/VMenu.mjs +132 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VMenu/shared.mjs +4 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs +291 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/locationStrategies.mjs +292 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/requestNewFrame.mjs +15 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/scrollStrategies.mjs +91 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/useActivator.mjs +179 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/util/point.mjs +42 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.mjs +129 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.mjs +195 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VProgressLinear/chunks.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VResponsive/VResponsive.mjs +56 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbar.mjs +167 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbarTitle.mjs +37 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/createTransition.mjs +113 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/dialog-transition.mjs +136 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/expand-transition.mjs +52 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/border.mjs +19 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/color.mjs +69 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/component.mjs +11 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/defaults.mjs +70 -45
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/delay.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/density.mjs +20 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/dimensions.mjs +23 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/display.mjs +23 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/elevation.mjs +25 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/focusTrap.mjs +97 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/forwardRefs.mjs +78 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/group.mjs +169 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/hydration.mjs +20 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/iconSizes.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +73 -40
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/intersectionObserver.mjs +24 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/lazy.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/list-items.mjs +33 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/loader.mjs +38 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/locale.mjs +22 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/location.mjs +49 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/activeStrategies.mjs +102 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/nested.mjs +315 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/openStrategies.mjs +60 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/selectStrategies.mjs +206 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/position.mjs +22 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/proxiedModel.mjs +35 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/resizeObserver.mjs +26 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/reveal.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/rounded.mjs +30 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/router.mjs +97 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/scopeId.mjs +12 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/selectLink.mjs +16 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/size.mjs +27 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/ssrBoot.mjs +17 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/stack.mjs +39 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/tag.mjs +10 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/teleport.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/theme.mjs +32 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/toggleScope.mjs +19 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/transition.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/variant.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/click-outside/index.mjs +62 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/intersect/index.mjs +41 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/ripple/index.mjs +183 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/anchor.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/animation.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/bindProps.mjs +36 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/box.mjs +73 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/color/APCA.mjs +19 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colorUtils.mjs +141 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/console.mjs +12 -4
- package/dist/bt-core/core/node_modules/vuetify/lib/util/createSimpleFunctional.mjs +31 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/deepEqual.mjs +37 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/dom.mjs +14 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/easing.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getCurrentInstance.mjs +13 -6
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getScrollParent.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/globals.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +301 -28
- package/dist/bt-core/core/node_modules/vuetify/lib/util/isFixedPosition.mjs +11 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/throttle.mjs +25 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/useRender.mjs +8 -0
- package/dist/components/BT-Blade.vue.mjs +108 -97
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { inject as e } from "vue";
|
|
2
|
+
const o = Symbol.for("vuetify:locale");
|
|
3
|
+
function n() {
|
|
4
|
+
const t = e(o);
|
|
5
|
+
if (!t)
|
|
6
|
+
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
7
|
+
return t;
|
|
8
|
+
}
|
|
9
|
+
function r() {
|
|
10
|
+
const t = e(o);
|
|
11
|
+
if (!t)
|
|
12
|
+
throw new Error("[Vuetify] Could not find injected rtl instance");
|
|
13
|
+
return {
|
|
14
|
+
isRtl: t.isRtl,
|
|
15
|
+
rtlClasses: t.rtlClasses
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
o as LocaleSymbol,
|
|
20
|
+
n as useLocale,
|
|
21
|
+
r as useRtl
|
|
22
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useRtl as f } from "./locale.mjs";
|
|
2
|
+
import { computed as m } from "vue";
|
|
3
|
+
import { parseAnchor as p } from "../util/anchor.mjs";
|
|
4
|
+
import { propsFactory as u } from "../util/propsFactory.mjs";
|
|
5
|
+
const i = {
|
|
6
|
+
center: "center",
|
|
7
|
+
top: "bottom",
|
|
8
|
+
bottom: "top",
|
|
9
|
+
left: "right",
|
|
10
|
+
right: "left"
|
|
11
|
+
}, x = u({
|
|
12
|
+
location: String
|
|
13
|
+
}, "location");
|
|
14
|
+
function S(o) {
|
|
15
|
+
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l = arguments.length > 2 ? arguments[2] : void 0;
|
|
16
|
+
const {
|
|
17
|
+
isRtl: s
|
|
18
|
+
} = f();
|
|
19
|
+
return {
|
|
20
|
+
locationStyles: m(() => {
|
|
21
|
+
if (!o.location)
|
|
22
|
+
return {};
|
|
23
|
+
const {
|
|
24
|
+
side: e,
|
|
25
|
+
align: n
|
|
26
|
+
} = p(o.location.split(" ").length > 1 ? o.location : `${o.location} center`, s.value);
|
|
27
|
+
function a(c) {
|
|
28
|
+
return l ? l(c) : 0;
|
|
29
|
+
}
|
|
30
|
+
const t = {};
|
|
31
|
+
return e !== "center" && (r ? t[i[e]] = `calc(100% - ${a(e)}px)` : t[e] = 0), n !== "center" ? r ? t[i[n]] = `calc(100% - ${a(n)}px)` : t[n] = 0 : (e === "center" ? t.top = t.left = "50%" : t[{
|
|
32
|
+
top: "left",
|
|
33
|
+
bottom: "left",
|
|
34
|
+
left: "top",
|
|
35
|
+
right: "top"
|
|
36
|
+
}[e]] = "50%", t.transform = {
|
|
37
|
+
top: "translateX(-50%)",
|
|
38
|
+
bottom: "translateX(-50%)",
|
|
39
|
+
left: "translateY(-50%)",
|
|
40
|
+
right: "translateY(-50%)",
|
|
41
|
+
center: "translate(-50%, -50%)"
|
|
42
|
+
}[e]), t;
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
x as makeLocationProps,
|
|
48
|
+
S as useLocation
|
|
49
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { toRaw as o } from "vue";
|
|
2
|
+
import { wrapInArray as u } from "../../util/helpers.mjs";
|
|
3
|
+
const l = (s) => {
|
|
4
|
+
const a = {
|
|
5
|
+
activate: (i) => {
|
|
6
|
+
let {
|
|
7
|
+
id: r,
|
|
8
|
+
value: e,
|
|
9
|
+
activated: t
|
|
10
|
+
} = i;
|
|
11
|
+
return r = o(r), s && !e && t.size === 1 && t.has(r) || (e ? t.add(r) : t.delete(r)), t;
|
|
12
|
+
},
|
|
13
|
+
in: (i, r, e) => {
|
|
14
|
+
let t = /* @__PURE__ */ new Set();
|
|
15
|
+
if (i != null)
|
|
16
|
+
for (const n of u(i))
|
|
17
|
+
t = a.activate({
|
|
18
|
+
id: n,
|
|
19
|
+
value: !0,
|
|
20
|
+
activated: new Set(t),
|
|
21
|
+
children: r,
|
|
22
|
+
parents: e
|
|
23
|
+
});
|
|
24
|
+
return t;
|
|
25
|
+
},
|
|
26
|
+
out: (i) => Array.from(i)
|
|
27
|
+
};
|
|
28
|
+
return a;
|
|
29
|
+
}, d = (s) => {
|
|
30
|
+
const a = l(s);
|
|
31
|
+
return {
|
|
32
|
+
activate: (r) => {
|
|
33
|
+
let {
|
|
34
|
+
activated: e,
|
|
35
|
+
id: t,
|
|
36
|
+
...n
|
|
37
|
+
} = r;
|
|
38
|
+
t = o(t);
|
|
39
|
+
const c = e.has(t) ? /* @__PURE__ */ new Set([t]) : /* @__PURE__ */ new Set();
|
|
40
|
+
return a.activate({
|
|
41
|
+
...n,
|
|
42
|
+
id: t,
|
|
43
|
+
activated: c
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
in: (r, e, t) => {
|
|
47
|
+
let n = /* @__PURE__ */ new Set();
|
|
48
|
+
if (r != null) {
|
|
49
|
+
const c = u(r);
|
|
50
|
+
c.length && (n = a.in(c.slice(0, 1), e, t));
|
|
51
|
+
}
|
|
52
|
+
return n;
|
|
53
|
+
},
|
|
54
|
+
out: (r, e, t) => a.out(r, e, t)
|
|
55
|
+
};
|
|
56
|
+
}, y = (s) => {
|
|
57
|
+
const a = l(s);
|
|
58
|
+
return {
|
|
59
|
+
activate: (r) => {
|
|
60
|
+
let {
|
|
61
|
+
id: e,
|
|
62
|
+
activated: t,
|
|
63
|
+
children: n,
|
|
64
|
+
...c
|
|
65
|
+
} = r;
|
|
66
|
+
return e = o(e), n.has(e) ? t : a.activate({
|
|
67
|
+
id: e,
|
|
68
|
+
activated: t,
|
|
69
|
+
children: n,
|
|
70
|
+
...c
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
in: a.in,
|
|
74
|
+
out: a.out
|
|
75
|
+
};
|
|
76
|
+
}, S = (s) => {
|
|
77
|
+
const a = d(s);
|
|
78
|
+
return {
|
|
79
|
+
activate: (r) => {
|
|
80
|
+
let {
|
|
81
|
+
id: e,
|
|
82
|
+
activated: t,
|
|
83
|
+
children: n,
|
|
84
|
+
...c
|
|
85
|
+
} = r;
|
|
86
|
+
return e = o(e), n.has(e) ? t : a.activate({
|
|
87
|
+
id: e,
|
|
88
|
+
activated: t,
|
|
89
|
+
children: n,
|
|
90
|
+
...c
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
in: a.in,
|
|
94
|
+
out: a.out
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
l as independentActiveStrategy,
|
|
99
|
+
d as independentSingleActiveStrategy,
|
|
100
|
+
y as leafActiveStrategy,
|
|
101
|
+
S as leafSingleActiveStrategy
|
|
102
|
+
};
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { useProxiedModel as G } from "../proxiedModel.mjs";
|
|
2
|
+
import { shallowRef as b, ref as s, computed as v, onBeforeUnmount as E, watch as x, toValue as m, toRaw as j, toRef as R, provide as U, nextTick as F, inject as I, onBeforeMount as H } from "vue";
|
|
3
|
+
import { independentSingleActiveStrategy as J, independentActiveStrategy as K, leafSingleActiveStrategy as Q, leafActiveStrategy as W } from "./activeStrategies.mjs";
|
|
4
|
+
import { multipleOpenStrategy as X, singleOpenStrategy as Y, listOpenStrategy as Z } from "./openStrategies.mjs";
|
|
5
|
+
import { classicSelectStrategy as ee, branchSelectStrategy as te, trunkSelectStrategy as ae, independentSingleSelectStrategy as ne, independentSelectStrategy as le, leafSelectStrategy as re, leafSingleSelectStrategy as oe } from "./selectStrategies.mjs";
|
|
6
|
+
import { throttle as ce } from "../../util/throttle.mjs";
|
|
7
|
+
import { propsFactory as ie } from "../../util/propsFactory.mjs";
|
|
8
|
+
import { getCurrentInstance as ue } from "../../util/getCurrentInstance.mjs";
|
|
9
|
+
import { consoleError as se } from "../../util/console.mjs";
|
|
10
|
+
const A = Symbol.for("vuetify:nested"), L = {
|
|
11
|
+
id: b(),
|
|
12
|
+
root: {
|
|
13
|
+
itemsRegistration: s("render"),
|
|
14
|
+
register: () => null,
|
|
15
|
+
unregister: () => null,
|
|
16
|
+
updateDisabled: () => null,
|
|
17
|
+
children: s(/* @__PURE__ */ new Map()),
|
|
18
|
+
parents: s(/* @__PURE__ */ new Map()),
|
|
19
|
+
disabled: s(/* @__PURE__ */ new Set()),
|
|
20
|
+
open: () => null,
|
|
21
|
+
openOnSelect: () => null,
|
|
22
|
+
activate: () => null,
|
|
23
|
+
select: () => null,
|
|
24
|
+
activatable: s(!1),
|
|
25
|
+
scrollToActive: s(!1),
|
|
26
|
+
selectable: s(!1),
|
|
27
|
+
opened: s(/* @__PURE__ */ new Set()),
|
|
28
|
+
activated: s(/* @__PURE__ */ new Set()),
|
|
29
|
+
selected: s(/* @__PURE__ */ new Map()),
|
|
30
|
+
selectedValues: s([]),
|
|
31
|
+
getPath: () => []
|
|
32
|
+
}
|
|
33
|
+
}, we = ie({
|
|
34
|
+
activatable: Boolean,
|
|
35
|
+
selectable: Boolean,
|
|
36
|
+
activeStrategy: [String, Function, Object],
|
|
37
|
+
selectStrategy: [String, Function, Object],
|
|
38
|
+
openStrategy: [String, Object],
|
|
39
|
+
opened: null,
|
|
40
|
+
activated: null,
|
|
41
|
+
selected: null,
|
|
42
|
+
mandatory: Boolean,
|
|
43
|
+
itemsRegistration: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "render"
|
|
46
|
+
}
|
|
47
|
+
}, "nested"), be = (t, h) => {
|
|
48
|
+
let {
|
|
49
|
+
items: S,
|
|
50
|
+
returnObject: l,
|
|
51
|
+
scrollToActive: k
|
|
52
|
+
} = h, i = !1;
|
|
53
|
+
const c = b(/* @__PURE__ */ new Map()), n = b(/* @__PURE__ */ new Map()), u = b(/* @__PURE__ */ new Set()), p = G(t, "opened", t.opened, (e) => new Set(Array.isArray(e) ? e.map((a) => j(a)) : e), (e) => [...e.values()]), V = v(() => {
|
|
54
|
+
if (typeof t.activeStrategy == "object")
|
|
55
|
+
return t.activeStrategy;
|
|
56
|
+
if (typeof t.activeStrategy == "function")
|
|
57
|
+
return t.activeStrategy(t.mandatory);
|
|
58
|
+
switch (t.activeStrategy) {
|
|
59
|
+
case "leaf":
|
|
60
|
+
return W(t.mandatory);
|
|
61
|
+
case "single-leaf":
|
|
62
|
+
return Q(t.mandatory);
|
|
63
|
+
case "independent":
|
|
64
|
+
return K(t.mandatory);
|
|
65
|
+
case "single-independent":
|
|
66
|
+
default:
|
|
67
|
+
return J(t.mandatory);
|
|
68
|
+
}
|
|
69
|
+
}), N = v(() => {
|
|
70
|
+
if (typeof t.selectStrategy == "object")
|
|
71
|
+
return t.selectStrategy;
|
|
72
|
+
if (typeof t.selectStrategy == "function")
|
|
73
|
+
return t.selectStrategy(t.mandatory);
|
|
74
|
+
switch (t.selectStrategy) {
|
|
75
|
+
case "single-leaf":
|
|
76
|
+
return oe(t.mandatory);
|
|
77
|
+
case "leaf":
|
|
78
|
+
return re(t.mandatory);
|
|
79
|
+
case "independent":
|
|
80
|
+
return le(t.mandatory);
|
|
81
|
+
case "single-independent":
|
|
82
|
+
return ne(t.mandatory);
|
|
83
|
+
case "trunk":
|
|
84
|
+
return ae(t.mandatory);
|
|
85
|
+
case "branch":
|
|
86
|
+
return te(t.mandatory);
|
|
87
|
+
case "classic":
|
|
88
|
+
default:
|
|
89
|
+
return ee(t.mandatory);
|
|
90
|
+
}
|
|
91
|
+
}), _ = v(() => {
|
|
92
|
+
if (typeof t.openStrategy == "object")
|
|
93
|
+
return t.openStrategy;
|
|
94
|
+
switch (t.openStrategy) {
|
|
95
|
+
case "list":
|
|
96
|
+
return Z;
|
|
97
|
+
case "single":
|
|
98
|
+
return Y;
|
|
99
|
+
case "multiple":
|
|
100
|
+
default:
|
|
101
|
+
return X;
|
|
102
|
+
}
|
|
103
|
+
}), g = G(t, "activated", t.activated, (e) => V.value.in(e, c.value, n.value), (e) => V.value.out(e, c.value, n.value)), w = G(t, "selected", t.selected, (e) => N.value.in(e, c.value, n.value, u.value), (e) => N.value.out(e, c.value, n.value));
|
|
104
|
+
E(() => {
|
|
105
|
+
i = !0;
|
|
106
|
+
});
|
|
107
|
+
function y(e) {
|
|
108
|
+
const a = [];
|
|
109
|
+
let r = j(e);
|
|
110
|
+
for (; r !== void 0; )
|
|
111
|
+
a.unshift(r), r = n.value.get(r);
|
|
112
|
+
return a;
|
|
113
|
+
}
|
|
114
|
+
const P = ue("nested"), T = /* @__PURE__ */ new Set(), z = ce(() => {
|
|
115
|
+
F(() => {
|
|
116
|
+
c.value = new Map(c.value), n.value = new Map(n.value);
|
|
117
|
+
});
|
|
118
|
+
}, 100);
|
|
119
|
+
x(() => [S.value, m(l)], () => {
|
|
120
|
+
t.itemsRegistration === "props" && q();
|
|
121
|
+
}, {
|
|
122
|
+
immediate: !0
|
|
123
|
+
});
|
|
124
|
+
function q() {
|
|
125
|
+
const e = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), o = m(l) ? (f) => j(f.raw) : (f) => f.value, d = [...S.value];
|
|
126
|
+
let O = 0;
|
|
127
|
+
for (; O < d.length; ) {
|
|
128
|
+
const f = d[O++], B = o(f);
|
|
129
|
+
if (f.children) {
|
|
130
|
+
const D = [];
|
|
131
|
+
for (const $ of f.children) {
|
|
132
|
+
const C = o($);
|
|
133
|
+
e.set(C, B), D.push(C), d.push($);
|
|
134
|
+
}
|
|
135
|
+
a.set(B, D);
|
|
136
|
+
}
|
|
137
|
+
f.props.disabled && r.add(B);
|
|
138
|
+
}
|
|
139
|
+
c.value = a, n.value = e, u.value = r;
|
|
140
|
+
}
|
|
141
|
+
const M = {
|
|
142
|
+
id: b(),
|
|
143
|
+
root: {
|
|
144
|
+
opened: p,
|
|
145
|
+
activatable: R(() => t.activatable),
|
|
146
|
+
scrollToActive: R(() => m(k)),
|
|
147
|
+
selectable: R(() => t.selectable),
|
|
148
|
+
activated: g,
|
|
149
|
+
selected: w,
|
|
150
|
+
selectedValues: v(() => {
|
|
151
|
+
const e = [];
|
|
152
|
+
for (const [a, r] of w.value.entries())
|
|
153
|
+
r === "on" && e.push(a);
|
|
154
|
+
return e;
|
|
155
|
+
}),
|
|
156
|
+
itemsRegistration: R(() => t.itemsRegistration),
|
|
157
|
+
register: (e, a, r, o) => {
|
|
158
|
+
if (T.has(e)) {
|
|
159
|
+
const d = y(e).map(String).join(" -> "), O = y(a).concat(e).map(String).join(" -> ");
|
|
160
|
+
se(`Multiple nodes with the same ID
|
|
161
|
+
${d}
|
|
162
|
+
${O}`);
|
|
163
|
+
return;
|
|
164
|
+
} else
|
|
165
|
+
T.add(e);
|
|
166
|
+
a && e !== a && n.value.set(e, a), r && u.value.add(e), o && c.value.set(e, []), a != null && c.value.set(a, [...c.value.get(a) || [], e]), z();
|
|
167
|
+
},
|
|
168
|
+
unregister: (e) => {
|
|
169
|
+
if (i)
|
|
170
|
+
return;
|
|
171
|
+
T.delete(e), c.value.delete(e), u.value.delete(e);
|
|
172
|
+
const a = n.value.get(e);
|
|
173
|
+
if (a) {
|
|
174
|
+
const r = c.value.get(a) ?? [];
|
|
175
|
+
c.value.set(a, r.filter((o) => o !== e));
|
|
176
|
+
}
|
|
177
|
+
n.value.delete(e), z();
|
|
178
|
+
},
|
|
179
|
+
updateDisabled: (e, a) => {
|
|
180
|
+
a ? u.value.add(e) : u.value.delete(e);
|
|
181
|
+
},
|
|
182
|
+
open: (e, a, r) => {
|
|
183
|
+
P.emit("click:open", {
|
|
184
|
+
id: e,
|
|
185
|
+
value: a,
|
|
186
|
+
path: y(e),
|
|
187
|
+
event: r
|
|
188
|
+
});
|
|
189
|
+
const o = _.value.open({
|
|
190
|
+
id: e,
|
|
191
|
+
value: a,
|
|
192
|
+
opened: new Set(p.value),
|
|
193
|
+
children: c.value,
|
|
194
|
+
parents: n.value,
|
|
195
|
+
event: r
|
|
196
|
+
});
|
|
197
|
+
o && (p.value = o);
|
|
198
|
+
},
|
|
199
|
+
openOnSelect: (e, a, r) => {
|
|
200
|
+
const o = _.value.select({
|
|
201
|
+
id: e,
|
|
202
|
+
value: a,
|
|
203
|
+
selected: new Map(w.value),
|
|
204
|
+
opened: new Set(p.value),
|
|
205
|
+
children: c.value,
|
|
206
|
+
parents: n.value,
|
|
207
|
+
event: r
|
|
208
|
+
});
|
|
209
|
+
o && (p.value = o);
|
|
210
|
+
},
|
|
211
|
+
select: (e, a, r) => {
|
|
212
|
+
P.emit("click:select", {
|
|
213
|
+
id: e,
|
|
214
|
+
value: a,
|
|
215
|
+
path: y(e),
|
|
216
|
+
event: r
|
|
217
|
+
});
|
|
218
|
+
const o = N.value.select({
|
|
219
|
+
id: e,
|
|
220
|
+
value: a,
|
|
221
|
+
selected: new Map(w.value),
|
|
222
|
+
children: c.value,
|
|
223
|
+
parents: n.value,
|
|
224
|
+
disabled: u.value,
|
|
225
|
+
event: r
|
|
226
|
+
});
|
|
227
|
+
o && (w.value = o), M.root.openOnSelect(e, a, r);
|
|
228
|
+
},
|
|
229
|
+
activate: (e, a, r) => {
|
|
230
|
+
if (!t.activatable)
|
|
231
|
+
return M.root.select(e, !0, r);
|
|
232
|
+
P.emit("click:activate", {
|
|
233
|
+
id: e,
|
|
234
|
+
value: a,
|
|
235
|
+
path: y(e),
|
|
236
|
+
event: r
|
|
237
|
+
});
|
|
238
|
+
const o = V.value.activate({
|
|
239
|
+
id: e,
|
|
240
|
+
value: a,
|
|
241
|
+
activated: new Set(g.value),
|
|
242
|
+
children: c.value,
|
|
243
|
+
parents: n.value,
|
|
244
|
+
event: r
|
|
245
|
+
});
|
|
246
|
+
if (o.size !== g.value.size)
|
|
247
|
+
g.value = o;
|
|
248
|
+
else {
|
|
249
|
+
for (const d of o)
|
|
250
|
+
if (!g.value.has(d)) {
|
|
251
|
+
g.value = o;
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
for (const d of g.value)
|
|
255
|
+
if (!o.has(d)) {
|
|
256
|
+
g.value = o;
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
children: c,
|
|
262
|
+
parents: n,
|
|
263
|
+
disabled: u,
|
|
264
|
+
getPath: y
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
return U(A, M), M.root;
|
|
268
|
+
}, Ae = (t, h, S) => {
|
|
269
|
+
const l = I(A, L), k = Symbol("nested item"), i = v(() => {
|
|
270
|
+
const n = j(m(t));
|
|
271
|
+
return n !== void 0 ? n : k;
|
|
272
|
+
}), c = {
|
|
273
|
+
...l,
|
|
274
|
+
id: i,
|
|
275
|
+
open: (n, u) => l.root.open(i.value, n, u),
|
|
276
|
+
openOnSelect: (n, u) => l.root.openOnSelect(i.value, n, u),
|
|
277
|
+
isOpen: v(() => l.root.opened.value.has(i.value)),
|
|
278
|
+
parent: v(() => l.root.parents.value.get(i.value)),
|
|
279
|
+
activate: (n, u) => l.root.activate(i.value, n, u),
|
|
280
|
+
isActivated: v(() => l.root.activated.value.has(i.value)),
|
|
281
|
+
scrollToActive: l.root.scrollToActive,
|
|
282
|
+
select: (n, u) => l.root.select(i.value, n, u),
|
|
283
|
+
isSelected: v(() => l.root.selected.value.get(i.value) === "on"),
|
|
284
|
+
isIndeterminate: v(() => l.root.selected.value.get(i.value) === "indeterminate"),
|
|
285
|
+
isLeaf: v(() => !l.root.children.value.get(i.value)),
|
|
286
|
+
isGroupActivator: l.isGroupActivator
|
|
287
|
+
};
|
|
288
|
+
return H(() => {
|
|
289
|
+
l.isGroupActivator || l.root.itemsRegistration.value === "props" || F(() => {
|
|
290
|
+
l.root.register(i.value, l.id.value, m(h), S);
|
|
291
|
+
});
|
|
292
|
+
}), E(() => {
|
|
293
|
+
l.isGroupActivator || l.root.itemsRegistration.value === "props" || l.root.unregister(i.value);
|
|
294
|
+
}), x(i, (n, u) => {
|
|
295
|
+
l.isGroupActivator || l.root.itemsRegistration.value === "props" || (l.root.unregister(u), F(() => {
|
|
296
|
+
l.root.register(n, l.id.value, m(h), S);
|
|
297
|
+
}));
|
|
298
|
+
}), x(() => m(h), (n) => {
|
|
299
|
+
l.root.updateDisabled(i.value, n);
|
|
300
|
+
}), S && U(A, c), c;
|
|
301
|
+
}, Me = () => {
|
|
302
|
+
const t = I(A, L);
|
|
303
|
+
U(A, {
|
|
304
|
+
...t,
|
|
305
|
+
isGroupActivator: !0
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
export {
|
|
309
|
+
A as VNestedSymbol,
|
|
310
|
+
L as emptyNested,
|
|
311
|
+
we as makeNestedProps,
|
|
312
|
+
be as useNested,
|
|
313
|
+
Me as useNestedGroupActivator,
|
|
314
|
+
Ae as useNestedItem
|
|
315
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
open: (p) => {
|
|
3
|
+
let {
|
|
4
|
+
id: t,
|
|
5
|
+
value: a,
|
|
6
|
+
opened: n,
|
|
7
|
+
parents: r
|
|
8
|
+
} = p;
|
|
9
|
+
if (a) {
|
|
10
|
+
const e = /* @__PURE__ */ new Set();
|
|
11
|
+
e.add(t);
|
|
12
|
+
let l = r.get(t);
|
|
13
|
+
for (; l != null; )
|
|
14
|
+
e.add(l), l = r.get(l);
|
|
15
|
+
return e;
|
|
16
|
+
} else
|
|
17
|
+
return n.delete(t), n;
|
|
18
|
+
},
|
|
19
|
+
select: () => null
|
|
20
|
+
}, d = {
|
|
21
|
+
open: (p) => {
|
|
22
|
+
let {
|
|
23
|
+
id: t,
|
|
24
|
+
value: a,
|
|
25
|
+
opened: n,
|
|
26
|
+
parents: r
|
|
27
|
+
} = p;
|
|
28
|
+
if (a) {
|
|
29
|
+
let e = r.get(t);
|
|
30
|
+
for (n.add(t); e != null && e !== t; )
|
|
31
|
+
n.add(e), e = r.get(e);
|
|
32
|
+
return n;
|
|
33
|
+
} else
|
|
34
|
+
n.delete(t);
|
|
35
|
+
return n;
|
|
36
|
+
},
|
|
37
|
+
select: () => null
|
|
38
|
+
}, u = {
|
|
39
|
+
open: d.open,
|
|
40
|
+
select: (p) => {
|
|
41
|
+
let {
|
|
42
|
+
id: t,
|
|
43
|
+
value: a,
|
|
44
|
+
opened: n,
|
|
45
|
+
parents: r
|
|
46
|
+
} = p;
|
|
47
|
+
if (!a)
|
|
48
|
+
return n;
|
|
49
|
+
const e = [];
|
|
50
|
+
let l = r.get(t);
|
|
51
|
+
for (; l != null; )
|
|
52
|
+
e.push(l), l = r.get(l);
|
|
53
|
+
return new Set(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
u as listOpenStrategy,
|
|
58
|
+
d as multipleOpenStrategy,
|
|
59
|
+
s as singleOpenStrategy
|
|
60
|
+
};
|