@uzum-tech/ui 2.0.6 → 2.0.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.
- package/dist/index.js +159 -87
- package/dist/index.mjs +159 -87
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/_internal/icons/index.d.ts +0 -1
- package/es/_internal/icons/index.mjs +0 -1
- package/es/components.d.ts +74 -31
- package/es/tree/src/Tree.d.ts +49 -24
- package/es/tree/src/Tree.mjs +18 -13
- package/es/tree/src/TreeNodeCheckbox.d.ts +4 -0
- package/es/tree/src/TreeNodeSwitcher.mjs +24 -26
- package/es/tree/src/styles/index.cssr.mjs +11 -8
- package/es/tree/styles/light.d.ts +4 -0
- package/es/tree/styles/light.mjs +2 -0
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +52 -17
- package/es/tree-select/src/TreeSelect.mjs +78 -45
- package/es/tree-select/src/interface.d.ts +7 -1
- package/es/tree-select/src/scroll-option-end.d.ts +3 -0
- package/es/tree-select/src/scroll-option-end.mjs +28 -0
- package/es/tree-select/styles/light.d.ts +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icons/index.d.ts +0 -1
- package/lib/_internal/icons/index.js +1 -3
- package/lib/components.d.ts +74 -31
- package/lib/tree/src/Tree.d.ts +49 -24
- package/lib/tree/src/Tree.js +16 -15
- package/lib/tree/src/TreeNodeCheckbox.d.ts +4 -0
- package/lib/tree/src/TreeNodeSwitcher.js +11 -14
- package/lib/tree/src/styles/index.cssr.js +11 -8
- package/lib/tree/styles/light.d.ts +4 -0
- package/lib/tree/styles/light.js +2 -0
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +52 -17
- package/lib/tree-select/src/TreeSelect.js +79 -49
- package/lib/tree-select/src/interface.d.ts +7 -1
- package/lib/tree-select/src/scroll-option-end.d.ts +3 -0
- package/lib/tree-select/src/scroll-option-end.js +30 -0
- package/lib/tree-select/styles/light.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -4
- package/web-types.json +41 -1
- package/es/_internal/icons/Switcher.d.ts +0 -2
- package/es/_internal/icons/Switcher.mjs +0 -12
- package/lib/_internal/icons/Switcher.d.ts +0 -2
- package/lib/_internal/icons/Switcher.js +0 -10
package/dist/index.js
CHANGED
|
@@ -11174,7 +11174,7 @@
|
|
|
11174
11174
|
* @name has
|
|
11175
11175
|
* @memberOf SetCache
|
|
11176
11176
|
* @param {*} value The value to search for.
|
|
11177
|
-
* @returns {
|
|
11177
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
11178
11178
|
*/
|
|
11179
11179
|
function setCacheHas(value) {
|
|
11180
11180
|
return this.__data__.has(value);
|
|
@@ -14810,13 +14810,6 @@
|
|
|
14810
14810
|
))
|
|
14811
14811
|
);
|
|
14812
14812
|
|
|
14813
|
-
var SwitcherIcon = vue.defineComponent({
|
|
14814
|
-
name: "Switcher",
|
|
14815
|
-
render() {
|
|
14816
|
-
return /* @__PURE__ */ vue.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, /* @__PURE__ */ vue.h("path", { d: "M12 8l10 8l-10 8z" }));
|
|
14817
|
-
}
|
|
14818
|
-
});
|
|
14819
|
-
|
|
14820
14813
|
var TimeIcon = replaceable(
|
|
14821
14814
|
"time",
|
|
14822
14815
|
/* @__PURE__ */ vue.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, /* @__PURE__ */ vue.h(
|
|
@@ -49221,6 +49214,8 @@
|
|
|
49221
49214
|
nodeColorPressed: elementsQuaternary,
|
|
49222
49215
|
nodeColorActive: brandPrimary100,
|
|
49223
49216
|
arrowColor: elementsPrimary,
|
|
49217
|
+
switcherColor: elementsTertiary,
|
|
49218
|
+
switcherSize: "22px",
|
|
49224
49219
|
nodeTextColor: textPrimary,
|
|
49225
49220
|
nodeTextColorDisabled: textSecondary,
|
|
49226
49221
|
loadingColor: elementsPrimary,
|
|
@@ -108203,6 +108198,16 @@
|
|
|
108203
108198
|
treeInjectionKey,
|
|
108204
108199
|
null
|
|
108205
108200
|
);
|
|
108201
|
+
const renderSwitchIcon = () => {
|
|
108202
|
+
const { value: renderSwitcherIcon } = renderSwitcherIconRef;
|
|
108203
|
+
return /* @__PURE__ */ vue.h(UIconSwitchTransition, null, {
|
|
108204
|
+
default: () => renderSwitcherIcon ? renderSwitcherIcon({
|
|
108205
|
+
expanded: props.expanded,
|
|
108206
|
+
selected: props.selected,
|
|
108207
|
+
option: props.tmNode.rawNode
|
|
108208
|
+
}) : /* @__PURE__ */ vue.h(UBaseIcon, { clsPrefix: props.clsPrefix, key: "switcher" }, { default: () => /* @__PURE__ */ vue.h(ChevronRightIcon, null) })
|
|
108209
|
+
});
|
|
108210
|
+
};
|
|
108206
108211
|
return () => {
|
|
108207
108212
|
const { clsPrefix, expanded, hide, indent, onClick } = props;
|
|
108208
108213
|
return /* @__PURE__ */ vue.h(
|
|
@@ -108217,28 +108222,16 @@
|
|
|
108217
108222
|
style: { width: `${indent}px` },
|
|
108218
108223
|
onClick
|
|
108219
108224
|
},
|
|
108220
|
-
/* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-tree-node-switcher__icon` }, /* @__PURE__ */ vue.h(
|
|
108221
|
-
|
|
108222
|
-
|
|
108223
|
-
|
|
108224
|
-
|
|
108225
|
-
|
|
108226
|
-
|
|
108227
|
-
|
|
108228
|
-
radius: 85,
|
|
108229
|
-
strokeWidth: 20,
|
|
108230
|
-
...spinPropsRef?.value
|
|
108231
|
-
}
|
|
108232
|
-
);
|
|
108233
|
-
}
|
|
108234
|
-
const { value: renderSwitcherIcon } = renderSwitcherIconRef;
|
|
108235
|
-
return renderSwitcherIcon ? renderSwitcherIcon({
|
|
108236
|
-
expanded: props.expanded,
|
|
108237
|
-
selected: props.selected,
|
|
108238
|
-
option: props.tmNode.rawNode
|
|
108239
|
-
}) : /* @__PURE__ */ vue.h(UBaseIcon, { clsPrefix, key: "switcher" }, { default: () => /* @__PURE__ */ vue.h(SwitcherIcon, null) });
|
|
108225
|
+
/* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-tree-node-switcher__icon` }, props.loading ? /* @__PURE__ */ vue.h(
|
|
108226
|
+
UBaseLoading,
|
|
108227
|
+
{
|
|
108228
|
+
clsPrefix,
|
|
108229
|
+
key: "loading",
|
|
108230
|
+
radius: 85,
|
|
108231
|
+
strokeWidth: 20,
|
|
108232
|
+
...spinPropsRef?.value
|
|
108240
108233
|
}
|
|
108241
|
-
|
|
108234
|
+
) : renderSwitchIcon())
|
|
108242
108235
|
);
|
|
108243
108236
|
};
|
|
108244
108237
|
}
|
|
@@ -108926,19 +108919,20 @@
|
|
|
108926
108919
|
vertical-align: bottom;
|
|
108927
108920
|
`, [cE("icon", `
|
|
108928
108921
|
position: relative;
|
|
108929
|
-
height:
|
|
108930
|
-
width:
|
|
108922
|
+
height: var(--u-switcher-size);
|
|
108923
|
+
width: var(--u-switcher-size);
|
|
108931
108924
|
display: flex;
|
|
108925
|
+
align-items: center;
|
|
108926
|
+
justify-content: center;
|
|
108927
|
+
border-radius: 50%;
|
|
108932
108928
|
color: var(--u-arrow-color);
|
|
108933
|
-
|
|
108929
|
+
background-color: var(--u-switcher-color);
|
|
108930
|
+
transition:
|
|
108931
|
+
color .3s var(--u-bezier),
|
|
108932
|
+
background-color .3s var(--u-bezier);
|
|
108934
108933
|
font-size: 14px;
|
|
108935
108934
|
`, [cB("icon", [iconSwitchTransitionNode]), cB("base-loading", `
|
|
108936
108935
|
color: var(--u-loading-color);
|
|
108937
|
-
position: absolute;
|
|
108938
|
-
left: 0;
|
|
108939
|
-
top: 0;
|
|
108940
|
-
right: 0;
|
|
108941
|
-
bottom: 0;
|
|
108942
108936
|
`, [iconSwitchTransitionNode]), cB("base-icon", [iconSwitchTransitionNode])]), cM("hide", "visibility: hidden;"), cM("expanded", "transform: rotate(90deg);")]), cB("tree-node-checkbox", `
|
|
108943
108937
|
display: inline-flex;
|
|
108944
108938
|
height: var(--u-node-content-height);
|
|
@@ -109075,7 +109069,7 @@
|
|
|
109075
109069
|
scrollbarProps: Object,
|
|
109076
109070
|
indent: {
|
|
109077
109071
|
type: Number,
|
|
109078
|
-
default:
|
|
109072
|
+
default: 36
|
|
109079
109073
|
},
|
|
109080
109074
|
allowDrop: {
|
|
109081
109075
|
type: Function,
|
|
@@ -109111,6 +109105,7 @@
|
|
|
109111
109105
|
"onUpdate:checkedKeys": [Function, Array],
|
|
109112
109106
|
onUpdateSelectedKeys: [Function, Array],
|
|
109113
109107
|
"onUpdate:selectedKeys": [Function, Array],
|
|
109108
|
+
onScroll: [Function, Array],
|
|
109114
109109
|
...treeSharedProps,
|
|
109115
109110
|
// internal props for tree-select
|
|
109116
109111
|
internalTreeSelect: Boolean,
|
|
@@ -109850,8 +109845,8 @@
|
|
|
109850
109845
|
}
|
|
109851
109846
|
doDragLeave({ event, node: node.rawNode });
|
|
109852
109847
|
}
|
|
109853
|
-
function handleDragLeaveTree(
|
|
109854
|
-
if (
|
|
109848
|
+
function handleDragLeaveTree(event) {
|
|
109849
|
+
if (event.target !== event.currentTarget)
|
|
109855
109850
|
return;
|
|
109856
109851
|
resetDropState();
|
|
109857
109852
|
}
|
|
@@ -110048,22 +110043,26 @@
|
|
|
110048
110043
|
});
|
|
110049
110044
|
resetDndState();
|
|
110050
110045
|
}
|
|
110051
|
-
function
|
|
110046
|
+
function doScroll(event) {
|
|
110047
|
+
props.onScroll && call(props.onScroll, event);
|
|
110048
|
+
}
|
|
110049
|
+
function handleScroll(event) {
|
|
110052
110050
|
syncScrollbar();
|
|
110051
|
+
doScroll(event);
|
|
110053
110052
|
}
|
|
110054
110053
|
function handleResize() {
|
|
110055
110054
|
syncScrollbar();
|
|
110056
110055
|
}
|
|
110057
|
-
function handleFocusout(
|
|
110056
|
+
function handleFocusout(event) {
|
|
110058
110057
|
if (props.virtualScroll || props.internalScrollable) {
|
|
110059
110058
|
const { value: scrollbarInst } = scrollbarInstRef;
|
|
110060
|
-
if (scrollbarInst?.containerRef?.contains(
|
|
110059
|
+
if (scrollbarInst?.containerRef?.contains(event.relatedTarget)) {
|
|
110061
110060
|
return;
|
|
110062
110061
|
}
|
|
110063
110062
|
pendingNodeKeyRef.value = null;
|
|
110064
110063
|
} else {
|
|
110065
110064
|
const { value: selfEl } = selfElRef;
|
|
110066
|
-
if (selfEl?.contains(
|
|
110065
|
+
if (selfEl?.contains(event.relatedTarget))
|
|
110067
110066
|
return;
|
|
110068
110067
|
pendingNodeKeyRef.value = null;
|
|
110069
110068
|
}
|
|
@@ -110176,6 +110175,8 @@
|
|
|
110176
110175
|
nodeColorPressed,
|
|
110177
110176
|
nodeColorActive,
|
|
110178
110177
|
arrowColor,
|
|
110178
|
+
switcherColor,
|
|
110179
|
+
switcherSize,
|
|
110179
110180
|
loadingColor,
|
|
110180
110181
|
nodeTextColor,
|
|
110181
110182
|
nodeTextColorDisabled,
|
|
@@ -110192,6 +110193,8 @@
|
|
|
110192
110193
|
);
|
|
110193
110194
|
return {
|
|
110194
110195
|
"--u-arrow-color": arrowColor,
|
|
110196
|
+
"--u-switcher-color": switcherColor,
|
|
110197
|
+
"--u-switcher-size": switcherSize,
|
|
110195
110198
|
"--u-loading-color": loadingColor,
|
|
110196
110199
|
"--u-bezier": cubicBezierEaseInOut,
|
|
110197
110200
|
"--u-font-size": fontSize,
|
|
@@ -110340,6 +110343,7 @@
|
|
|
110340
110343
|
...scrollbarProps,
|
|
110341
110344
|
class: treeClass,
|
|
110342
110345
|
tabindex,
|
|
110346
|
+
onScroll: this.handleScroll,
|
|
110343
110347
|
onKeydown: mergedFocusable ? handleKeydown : void 0,
|
|
110344
110348
|
onFocusout: mergedFocusable ? handleFocusout : void 0,
|
|
110345
110349
|
style: this.cssVars,
|
|
@@ -110383,6 +110387,34 @@
|
|
|
110383
110387
|
}
|
|
110384
110388
|
});
|
|
110385
110389
|
|
|
110390
|
+
function isVerticallyVisibleWithin(element, containerRect) {
|
|
110391
|
+
const elementRect = element.getBoundingClientRect();
|
|
110392
|
+
return elementRect.top < containerRect.bottom && elementRect.bottom > containerRect.top;
|
|
110393
|
+
}
|
|
110394
|
+
function scanReachedRootOptions(scrollElement, rootNodes, expandedKeys, previousVisibleKeys) {
|
|
110395
|
+
const containerRect = scrollElement.getBoundingClientRect();
|
|
110396
|
+
const visibleKeys = /* @__PURE__ */new Set();
|
|
110397
|
+
const reachedOptions = [];
|
|
110398
|
+
for (const rootNode of rootNodes) {
|
|
110399
|
+
const {
|
|
110400
|
+
children
|
|
110401
|
+
} = rootNode;
|
|
110402
|
+
if (!children?.length || !expandedKeys?.includes(rootNode.key)) continue;
|
|
110403
|
+
const lastChild = children[children.length - 1];
|
|
110404
|
+
const lastChildElement = scrollElement.querySelector(`[data-key="${createDataKey(lastChild.key)}"]`);
|
|
110405
|
+
const isHiddenOrMissing = !lastChildElement || !isVerticallyVisibleWithin(lastChildElement, containerRect);
|
|
110406
|
+
if (isHiddenOrMissing) continue;
|
|
110407
|
+
visibleKeys.add(rootNode.key);
|
|
110408
|
+
if (!previousVisibleKeys.has(rootNode.key)) {
|
|
110409
|
+
reachedOptions.push(rootNode.rawNode);
|
|
110410
|
+
}
|
|
110411
|
+
}
|
|
110412
|
+
return {
|
|
110413
|
+
reachedOptions,
|
|
110414
|
+
visibleKeys
|
|
110415
|
+
};
|
|
110416
|
+
}
|
|
110417
|
+
|
|
110386
110418
|
var style$2 = c$1([cB("tree-select", `
|
|
110387
110419
|
z-index: auto;
|
|
110388
110420
|
outline: none;
|
|
@@ -110466,6 +110498,7 @@
|
|
|
110466
110498
|
loading: Boolean,
|
|
110467
110499
|
maxTagCount: [String, Number],
|
|
110468
110500
|
multiple: Boolean,
|
|
110501
|
+
remote: Boolean,
|
|
110469
110502
|
showPath: Boolean,
|
|
110470
110503
|
separator: {
|
|
110471
110504
|
type: String,
|
|
@@ -110501,6 +110534,9 @@
|
|
|
110501
110534
|
nodeProps: Function,
|
|
110502
110535
|
onBlur: Function,
|
|
110503
110536
|
onFocus: Function,
|
|
110537
|
+
onScroll: [Function, Array],
|
|
110538
|
+
onScrollOptionEnd: [Function, Array],
|
|
110539
|
+
onSearch: [Function, Array],
|
|
110504
110540
|
onLoad: Function,
|
|
110505
110541
|
onUpdateShow: [Function, Array],
|
|
110506
110542
|
onUpdateValue: [Function, Array],
|
|
@@ -110551,15 +110587,16 @@
|
|
|
110551
110587
|
const controlledShowRef = vue.toRef(props, "show");
|
|
110552
110588
|
const mergedShowRef = useMergedState(controlledShowRef, uncontrolledShowRef);
|
|
110553
110589
|
const patternRef = vue.ref("");
|
|
110590
|
+
const treePatternRef = vue.computed(() => {
|
|
110591
|
+
return props.remote ? "" : patternRef.value;
|
|
110592
|
+
});
|
|
110554
110593
|
const mergedFilterRef = vue.computed(() => {
|
|
110555
|
-
|
|
110556
|
-
|
|
110557
|
-
return filter;
|
|
110558
|
-
const { labelField } = props;
|
|
110594
|
+
if (props.filter)
|
|
110595
|
+
return props.filter;
|
|
110559
110596
|
return (pattern, node) => {
|
|
110560
110597
|
if (!pattern.length)
|
|
110561
110598
|
return true;
|
|
110562
|
-
return node[labelField].toLowerCase().includes(pattern.toLowerCase());
|
|
110599
|
+
return node[props.labelField].toLowerCase().includes(pattern.toLowerCase());
|
|
110563
110600
|
};
|
|
110564
110601
|
});
|
|
110565
110602
|
const dataTreeMateRef = vue.computed(
|
|
@@ -110589,6 +110626,7 @@
|
|
|
110589
110626
|
uncontrolledExpandedKeysRef
|
|
110590
110627
|
);
|
|
110591
110628
|
const focusedRef = vue.ref(false);
|
|
110629
|
+
let visibleRootEndKeys = /* @__PURE__ */ new Set();
|
|
110592
110630
|
const mergedPlaceholderRef = vue.computed(() => {
|
|
110593
110631
|
const { placeholder } = props;
|
|
110594
110632
|
if (placeholder !== void 0)
|
|
@@ -110731,17 +110769,17 @@
|
|
|
110731
110769
|
}
|
|
110732
110770
|
uncontrolledExpandedKeysRef.value = keys;
|
|
110733
110771
|
}
|
|
110734
|
-
function doFocus(
|
|
110772
|
+
function doFocus(event) {
|
|
110735
110773
|
const { onFocus } = props;
|
|
110736
110774
|
if (onFocus)
|
|
110737
|
-
onFocus(
|
|
110775
|
+
onFocus(event);
|
|
110738
110776
|
triggerFormFocus();
|
|
110739
110777
|
}
|
|
110740
|
-
function doBlur(
|
|
110778
|
+
function doBlur(event) {
|
|
110741
110779
|
closeMenu();
|
|
110742
110780
|
const { onBlur } = props;
|
|
110743
110781
|
if (onBlur)
|
|
110744
|
-
onBlur(
|
|
110782
|
+
onBlur(event);
|
|
110745
110783
|
triggerFormBlur();
|
|
110746
110784
|
}
|
|
110747
110785
|
function closeMenu() {
|
|
@@ -110758,11 +110796,12 @@
|
|
|
110758
110796
|
}
|
|
110759
110797
|
function handleMenuLeave() {
|
|
110760
110798
|
patternRef.value = "";
|
|
110799
|
+
visibleRootEndKeys = /* @__PURE__ */ new Set();
|
|
110761
110800
|
}
|
|
110762
|
-
function handleMenuClickoutside(
|
|
110801
|
+
function handleMenuClickoutside(event) {
|
|
110763
110802
|
if (mergedShowRef.value) {
|
|
110764
110803
|
if (!triggerInstRef.value?.$el.contains(
|
|
110765
|
-
getPreciseEventTarget(
|
|
110804
|
+
getPreciseEventTarget(event)
|
|
110766
110805
|
)) {
|
|
110767
110806
|
closeMenu();
|
|
110768
110807
|
}
|
|
@@ -110810,34 +110849,34 @@
|
|
|
110810
110849
|
doUpdateIndeterminateKeys(keys, getOptionsByKeys(keys));
|
|
110811
110850
|
}
|
|
110812
110851
|
}
|
|
110813
|
-
function handleTriggerFocus(
|
|
110814
|
-
if (menuElRef.value?.contains(
|
|
110852
|
+
function handleTriggerFocus(event) {
|
|
110853
|
+
if (menuElRef.value?.contains(event.relatedTarget))
|
|
110815
110854
|
return;
|
|
110816
110855
|
focusedRef.value = true;
|
|
110817
|
-
doFocus(
|
|
110856
|
+
doFocus(event);
|
|
110818
110857
|
}
|
|
110819
|
-
function handleTriggerBlur(
|
|
110820
|
-
if (menuElRef.value?.contains(
|
|
110858
|
+
function handleTriggerBlur(event) {
|
|
110859
|
+
if (menuElRef.value?.contains(event.relatedTarget))
|
|
110821
110860
|
return;
|
|
110822
110861
|
focusedRef.value = false;
|
|
110823
|
-
doBlur(
|
|
110862
|
+
doBlur(event);
|
|
110824
110863
|
}
|
|
110825
|
-
function handleMenuFocusin(
|
|
110826
|
-
if (menuElRef.value?.contains(
|
|
110864
|
+
function handleMenuFocusin(event) {
|
|
110865
|
+
if (menuElRef.value?.contains(event.relatedTarget) || triggerInstRef.value?.$el?.contains(event.relatedTarget)) {
|
|
110827
110866
|
return;
|
|
110828
110867
|
}
|
|
110829
110868
|
focusedRef.value = true;
|
|
110830
|
-
doFocus(
|
|
110869
|
+
doFocus(event);
|
|
110831
110870
|
}
|
|
110832
|
-
function handleMenuFocusout(
|
|
110833
|
-
if (menuElRef.value?.contains(
|
|
110871
|
+
function handleMenuFocusout(event) {
|
|
110872
|
+
if (menuElRef.value?.contains(event.relatedTarget) || triggerInstRef.value?.$el?.contains(event.relatedTarget)) {
|
|
110834
110873
|
return;
|
|
110835
110874
|
}
|
|
110836
110875
|
focusedRef.value = false;
|
|
110837
|
-
doBlur(
|
|
110876
|
+
doBlur(event);
|
|
110838
110877
|
}
|
|
110839
|
-
function handleClear(
|
|
110840
|
-
|
|
110878
|
+
function handleClear(event) {
|
|
110879
|
+
event.stopPropagation();
|
|
110841
110880
|
const { multiple } = props;
|
|
110842
110881
|
if (!multiple && props.filterable) {
|
|
110843
110882
|
closeMenu();
|
|
@@ -110890,20 +110929,24 @@
|
|
|
110890
110929
|
}
|
|
110891
110930
|
}
|
|
110892
110931
|
}
|
|
110893
|
-
function
|
|
110894
|
-
|
|
110932
|
+
function doSearch(value) {
|
|
110933
|
+
props.onSearch && call(props.onSearch, value);
|
|
110934
|
+
}
|
|
110935
|
+
function handlePatternInput(event) {
|
|
110936
|
+
const { value } = event.target;
|
|
110895
110937
|
patternRef.value = value;
|
|
110938
|
+
doSearch(value);
|
|
110896
110939
|
}
|
|
110897
|
-
function treeHandleKeydown(
|
|
110940
|
+
function treeHandleKeydown(event) {
|
|
110898
110941
|
const { value: treeInst } = treeInstRef;
|
|
110899
110942
|
if (treeInst) {
|
|
110900
|
-
treeInst.handleKeydown(
|
|
110943
|
+
treeInst.handleKeydown(event);
|
|
110901
110944
|
}
|
|
110902
110945
|
}
|
|
110903
|
-
function handleKeydown(
|
|
110904
|
-
if (
|
|
110946
|
+
function handleKeydown(event) {
|
|
110947
|
+
if (event.key === "Enter") {
|
|
110905
110948
|
if (mergedShowRef.value) {
|
|
110906
|
-
treeHandleKeydown(
|
|
110949
|
+
treeHandleKeydown(event);
|
|
110907
110950
|
if (!props.multiple) {
|
|
110908
110951
|
closeMenu();
|
|
110909
110952
|
focusSelection();
|
|
@@ -110911,17 +110954,17 @@
|
|
|
110911
110954
|
} else {
|
|
110912
110955
|
openMenu();
|
|
110913
110956
|
}
|
|
110914
|
-
|
|
110915
|
-
} else if (
|
|
110957
|
+
event.preventDefault();
|
|
110958
|
+
} else if (event.key === "Escape") {
|
|
110916
110959
|
if (mergedShowRef.value) {
|
|
110917
|
-
markEventEffectPerformed(
|
|
110960
|
+
markEventEffectPerformed(event);
|
|
110918
110961
|
closeMenu();
|
|
110919
110962
|
focusSelection();
|
|
110920
110963
|
}
|
|
110921
110964
|
} else {
|
|
110922
110965
|
if (mergedShowRef.value) {
|
|
110923
|
-
treeHandleKeydown(
|
|
110924
|
-
} else if (
|
|
110966
|
+
treeHandleKeydown(event);
|
|
110967
|
+
} else if (event.key === "ArrowDown") {
|
|
110925
110968
|
openMenu();
|
|
110926
110969
|
}
|
|
110927
110970
|
}
|
|
@@ -110930,9 +110973,35 @@
|
|
|
110930
110973
|
closeMenu();
|
|
110931
110974
|
focusSelection();
|
|
110932
110975
|
}
|
|
110933
|
-
function handleMenuMousedown(
|
|
110934
|
-
if (!happensIn(
|
|
110935
|
-
|
|
110976
|
+
function handleMenuMousedown(event) {
|
|
110977
|
+
if (!happensIn(event, "action"))
|
|
110978
|
+
event.preventDefault();
|
|
110979
|
+
}
|
|
110980
|
+
function doScroll(event) {
|
|
110981
|
+
const { onScroll } = props;
|
|
110982
|
+
if (onScroll)
|
|
110983
|
+
call(onScroll, event);
|
|
110984
|
+
}
|
|
110985
|
+
function doScrollOptionEnd(option, event) {
|
|
110986
|
+
props.onScrollOptionEnd && call(props.onScrollOptionEnd, option, event);
|
|
110987
|
+
}
|
|
110988
|
+
function handleTreeScroll(event) {
|
|
110989
|
+
doScroll(event);
|
|
110990
|
+
if (!props.onScrollOptionEnd)
|
|
110991
|
+
return;
|
|
110992
|
+
const scrollElement = event.currentTarget || event.target;
|
|
110993
|
+
if (!scrollElement)
|
|
110994
|
+
return;
|
|
110995
|
+
const { reachedOptions, visibleKeys } = scanReachedRootOptions(
|
|
110996
|
+
scrollElement,
|
|
110997
|
+
dataTreeMateRef.value.treeNodes,
|
|
110998
|
+
mergedExpandedKeysRef.value,
|
|
110999
|
+
visibleRootEndKeys
|
|
111000
|
+
);
|
|
111001
|
+
visibleRootEndKeys = visibleKeys;
|
|
111002
|
+
for (const reachedOption of reachedOptions) {
|
|
111003
|
+
doScrollOptionEnd(reachedOption, event);
|
|
111004
|
+
}
|
|
110936
111005
|
}
|
|
110937
111006
|
const selectionRenderTagRef = vue.computed(() => {
|
|
110938
111007
|
const { renderTag } = props;
|
|
@@ -111064,6 +111133,7 @@
|
|
|
111064
111133
|
selectedOption: selectedOptionRef,
|
|
111065
111134
|
selectedOptions: selectedOptionsRef,
|
|
111066
111135
|
pattern: patternRef,
|
|
111136
|
+
treePattern: treePatternRef,
|
|
111067
111137
|
pendingNodeKey: pendingNodeKeyRef,
|
|
111068
111138
|
mergedCascade: mergedCascadeRef,
|
|
111069
111139
|
mergedFilter: mergedFilterRef,
|
|
@@ -111085,6 +111155,7 @@
|
|
|
111085
111155
|
handleKeydown,
|
|
111086
111156
|
handleTabOut,
|
|
111087
111157
|
handleMenuMousedown,
|
|
111158
|
+
handleTreeScroll,
|
|
111088
111159
|
mergedTheme: themeRef,
|
|
111089
111160
|
cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
|
|
111090
111161
|
themeClass: themeClassHandle?.themeClass,
|
|
@@ -111195,7 +111266,7 @@
|
|
|
111195
111266
|
allowCheckingNotLoaded: this.allowCheckingNotLoaded,
|
|
111196
111267
|
showIrrelevantNodes: false,
|
|
111197
111268
|
animated: false,
|
|
111198
|
-
pattern: this.
|
|
111269
|
+
pattern: this.treePattern,
|
|
111199
111270
|
filter: this.mergedFilter,
|
|
111200
111271
|
data: options,
|
|
111201
111272
|
cancelable: multiple,
|
|
@@ -111245,7 +111316,8 @@
|
|
|
111245
111316
|
onLoad: this.onLoad,
|
|
111246
111317
|
onUpdateCheckedKeys: this.handleUpdateCheckedKeys,
|
|
111247
111318
|
onUpdateIndeterminateKeys: this.handleUpdateIndeterminateKeys,
|
|
111248
|
-
onUpdateExpandedKeys: this.doUpdateExpandedKeys
|
|
111319
|
+
onUpdateExpandedKeys: this.doUpdateExpandedKeys,
|
|
111320
|
+
onScroll: this.handleTreeScroll
|
|
111249
111321
|
}
|
|
111250
111322
|
),
|
|
111251
111323
|
resolveWrappedSlot($slots.action, (children) => {
|
|
@@ -113173,7 +113245,7 @@
|
|
|
113173
113245
|
});
|
|
113174
113246
|
}
|
|
113175
113247
|
|
|
113176
|
-
var version = "2.0.
|
|
113248
|
+
var version = "2.0.8";
|
|
113177
113249
|
|
|
113178
113250
|
function create({
|
|
113179
113251
|
componentPrefix = "U",
|