vue 3.5.40 → 3.5.42
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/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +231 -49
- package/dist/vue.esm-browser.prod.js +9 -8
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +231 -49
- package/dist/vue.global.prod.js +9 -8
- package/dist/vue.runtime.esm-browser.js +195 -34
- package/dist/vue.runtime.esm-browser.prod.js +4 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +195 -34
- package/dist/vue.runtime.global.prod.js +4 -3
- package/package.json +6 -6
package/dist/vue.esm-bundler.js
CHANGED
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.42
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -270,7 +270,7 @@ var Vue = (function (exports) {
|
|
|
270
270
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
271
271
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
272
272
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
273
|
-
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,
|
|
273
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
274
274
|
);
|
|
275
275
|
function includeBooleanAttr(value) {
|
|
276
276
|
return !!value || value === "";
|
|
@@ -305,6 +305,23 @@ var Vue = (function (exports) {
|
|
|
305
305
|
}
|
|
306
306
|
return equal;
|
|
307
307
|
}
|
|
308
|
+
function looseCompareCollections(a, b) {
|
|
309
|
+
if (a.size !== b.size) return false;
|
|
310
|
+
const candidates = Array.from(b);
|
|
311
|
+
const matched = new Uint8Array(candidates.length);
|
|
312
|
+
for (const item of a) {
|
|
313
|
+
let index = -1;
|
|
314
|
+
for (let i = 0; i < candidates.length; i++) {
|
|
315
|
+
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
316
|
+
index = i;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
if (index < 0) return false;
|
|
321
|
+
matched[index] = 1;
|
|
322
|
+
}
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
308
325
|
function looseEqual(a, b) {
|
|
309
326
|
if (a === b) return true;
|
|
310
327
|
let aValidType = isDate(a);
|
|
@@ -328,6 +345,16 @@ var Vue = (function (exports) {
|
|
|
328
345
|
if (!aValidType || !bValidType) {
|
|
329
346
|
return false;
|
|
330
347
|
}
|
|
348
|
+
aValidType = isMap(a);
|
|
349
|
+
bValidType = isMap(b);
|
|
350
|
+
if (aValidType || bValidType) {
|
|
351
|
+
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
352
|
+
}
|
|
353
|
+
aValidType = isSet(a);
|
|
354
|
+
bValidType = isSet(b);
|
|
355
|
+
if (aValidType || bValidType) {
|
|
356
|
+
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
357
|
+
}
|
|
331
358
|
const aKeysCount = Object.keys(a).length;
|
|
332
359
|
const bKeysCount = Object.keys(b).length;
|
|
333
360
|
if (aKeysCount !== bKeysCount) {
|
|
@@ -2673,7 +2700,9 @@ var Vue = (function (exports) {
|
|
|
2673
2700
|
cb.flags |= 1;
|
|
2674
2701
|
}
|
|
2675
2702
|
} else {
|
|
2676
|
-
|
|
2703
|
+
for (let i = 0; i < cb.length; i++) {
|
|
2704
|
+
pendingPostFlushCbs.push(cb[i]);
|
|
2705
|
+
}
|
|
2677
2706
|
}
|
|
2678
2707
|
queueFlush();
|
|
2679
2708
|
}
|
|
@@ -2709,7 +2738,9 @@ var Vue = (function (exports) {
|
|
|
2709
2738
|
);
|
|
2710
2739
|
pendingPostFlushCbs.length = 0;
|
|
2711
2740
|
if (activePostFlushCbs) {
|
|
2712
|
-
|
|
2741
|
+
for (let i = 0; i < deduped.length; i++) {
|
|
2742
|
+
activePostFlushCbs.push(deduped[i]);
|
|
2743
|
+
}
|
|
2713
2744
|
return;
|
|
2714
2745
|
}
|
|
2715
2746
|
activePostFlushCbs = deduped;
|
|
@@ -3970,7 +4001,11 @@ var Vue = (function (exports) {
|
|
|
3970
4001
|
function setTransitionHooks(vnode, hooks) {
|
|
3971
4002
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3972
4003
|
vnode.transition = hooks;
|
|
3973
|
-
|
|
4004
|
+
const subTree = vnode.component.subTree;
|
|
4005
|
+
setTransitionHooks(
|
|
4006
|
+
isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree,
|
|
4007
|
+
hooks
|
|
4008
|
+
);
|
|
3974
4009
|
} else if (vnode.shapeFlag & 128) {
|
|
3975
4010
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3976
4011
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4373,10 +4408,10 @@ var Vue = (function (exports) {
|
|
|
4373
4408
|
getContainerType(container),
|
|
4374
4409
|
optimized
|
|
4375
4410
|
);
|
|
4376
|
-
if (isAsyncWrapper(vnode) && !vnode.
|
|
4411
|
+
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
4377
4412
|
let subTree;
|
|
4378
4413
|
if (isFragmentStart) {
|
|
4379
|
-
subTree = createVNode(
|
|
4414
|
+
subTree = createVNode(Static);
|
|
4380
4415
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4381
4416
|
} else {
|
|
4382
4417
|
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
@@ -4510,6 +4545,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4510
4545
|
}
|
|
4511
4546
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4512
4547
|
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4548
|
+
if (isUnchangedResourceProp(el, key, props[key])) {
|
|
4549
|
+
continue;
|
|
4550
|
+
}
|
|
4513
4551
|
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4514
4552
|
}
|
|
4515
4553
|
}
|
|
@@ -4692,6 +4730,13 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4692
4730
|
};
|
|
4693
4731
|
return [hydrate, hydrateNode];
|
|
4694
4732
|
}
|
|
4733
|
+
const resourceProps = /* @__PURE__ */ new Set(["src", "srcset", "href", "poster"]);
|
|
4734
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
4735
|
+
if (!resourceProps.has(key)) {
|
|
4736
|
+
return false;
|
|
4737
|
+
}
|
|
4738
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
4739
|
+
}
|
|
4695
4740
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
4696
4741
|
let mismatchType;
|
|
4697
4742
|
let mismatchKey;
|
|
@@ -4729,7 +4774,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4729
4774
|
mismatchKey = "style";
|
|
4730
4775
|
}
|
|
4731
4776
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
4732
|
-
if (
|
|
4777
|
+
if (key === "hidden") {
|
|
4778
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
4779
|
+
expected = normalizeHiddenValue(clientValue);
|
|
4780
|
+
} else if (isBooleanAttr(key)) {
|
|
4733
4781
|
actual = el.hasAttribute(key);
|
|
4734
4782
|
expected = includeBooleanAttr(clientValue);
|
|
4735
4783
|
} else if (clientValue == null) {
|
|
@@ -4765,6 +4813,15 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4765
4813
|
}
|
|
4766
4814
|
return false;
|
|
4767
4815
|
}
|
|
4816
|
+
function normalizeHiddenValue(value) {
|
|
4817
|
+
if (!isRenderableAttrValue(value)) {
|
|
4818
|
+
return false;
|
|
4819
|
+
}
|
|
4820
|
+
if (isString(value)) {
|
|
4821
|
+
return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
4822
|
+
}
|
|
4823
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
4824
|
+
}
|
|
4768
4825
|
function toClassSet(str) {
|
|
4769
4826
|
return new Set(str.trim().split(/\s+/));
|
|
4770
4827
|
}
|
|
@@ -5257,7 +5314,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5257
5314
|
if (pendingCacheKey != null) {
|
|
5258
5315
|
if (isSuspense(instance.subTree.type)) {
|
|
5259
5316
|
queuePostRenderEffect(() => {
|
|
5260
|
-
|
|
5317
|
+
const vnode = getInnerChild(instance.subTree);
|
|
5318
|
+
if (vnode.component) {
|
|
5319
|
+
cache.set(pendingCacheKey, vnode);
|
|
5320
|
+
}
|
|
5261
5321
|
}, instance.subTree.suspense);
|
|
5262
5322
|
} else {
|
|
5263
5323
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
@@ -5578,7 +5638,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5578
5638
|
return slots;
|
|
5579
5639
|
}
|
|
5580
5640
|
|
|
5581
|
-
function renderSlot(slots, name, props
|
|
5641
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5642
|
+
if (props == null) props = {};
|
|
5582
5643
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5583
5644
|
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
5584
5645
|
const hasProps = Object.keys(slotProps).length > 0;
|
|
@@ -5657,12 +5718,41 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5657
5718
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
5658
5719
|
return getPublicInstance(i.parent);
|
|
5659
5720
|
};
|
|
5721
|
+
const resolveDevRootEl = (vnode) => {
|
|
5722
|
+
let found = false;
|
|
5723
|
+
while (true) {
|
|
5724
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
5725
|
+
const root = filterSingleRoot(vnode.children);
|
|
5726
|
+
if (!root) {
|
|
5727
|
+
return;
|
|
5728
|
+
}
|
|
5729
|
+
vnode = root;
|
|
5730
|
+
found = true;
|
|
5731
|
+
continue;
|
|
5732
|
+
}
|
|
5733
|
+
const component = vnode.component;
|
|
5734
|
+
if (component && component.subTree) {
|
|
5735
|
+
vnode = component.subTree;
|
|
5736
|
+
continue;
|
|
5737
|
+
}
|
|
5738
|
+
const suspense = vnode.suspense;
|
|
5739
|
+
if (suspense && suspense.activeBranch) {
|
|
5740
|
+
vnode = suspense.activeBranch;
|
|
5741
|
+
continue;
|
|
5742
|
+
}
|
|
5743
|
+
return found ? vnode.el : void 0;
|
|
5744
|
+
}
|
|
5745
|
+
};
|
|
5746
|
+
const getDevRootFragmentEl = (i) => {
|
|
5747
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
5748
|
+
return el === void 0 ? i.vnode.el : el;
|
|
5749
|
+
};
|
|
5660
5750
|
const publicPropertiesMap = (
|
|
5661
5751
|
// Move PURE marker to new line to workaround compiler discarding it
|
|
5662
5752
|
// due to type annotation
|
|
5663
5753
|
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
5664
5754
|
$: (i) => i,
|
|
5665
|
-
$el: (i) => i
|
|
5755
|
+
$el: (i) => getDevRootFragmentEl(i) ,
|
|
5666
5756
|
$data: (i) => i.data,
|
|
5667
5757
|
$props: (i) => shallowReadonly(i.props) ,
|
|
5668
5758
|
$attrs: (i) => shallowReadonly(i.attrs) ,
|
|
@@ -6762,7 +6852,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6762
6852
|
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
6763
6853
|
}
|
|
6764
6854
|
if (modifiers.number) {
|
|
6765
|
-
args =
|
|
6855
|
+
args = args.map(looseToNumber);
|
|
6766
6856
|
}
|
|
6767
6857
|
}
|
|
6768
6858
|
{
|
|
@@ -6999,12 +7089,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6999
7089
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
7000
7090
|
}
|
|
7001
7091
|
if (vnode.transition) {
|
|
7002
|
-
|
|
7092
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
7093
|
+
if (!isElementRoot(child)) {
|
|
7003
7094
|
warn$1(
|
|
7004
7095
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
7005
7096
|
);
|
|
7006
7097
|
}
|
|
7007
|
-
setTransitionHooks(
|
|
7098
|
+
setTransitionHooks(child, vnode.transition);
|
|
7008
7099
|
}
|
|
7009
7100
|
if (setRoot) {
|
|
7010
7101
|
setRoot(root);
|
|
@@ -9404,7 +9495,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9404
9495
|
if (suspense.deps <= 0) {
|
|
9405
9496
|
suspense.resolve();
|
|
9406
9497
|
} else if (isInFallback) {
|
|
9407
|
-
if (!isHydrating) {
|
|
9498
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
9408
9499
|
patch(
|
|
9409
9500
|
activeBranch,
|
|
9410
9501
|
newFallback,
|
|
@@ -9445,7 +9536,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9445
9536
|
);
|
|
9446
9537
|
if (suspense.deps <= 0) {
|
|
9447
9538
|
suspense.resolve();
|
|
9448
|
-
} else {
|
|
9539
|
+
} else if (!suspense.isFallbackMountPending) {
|
|
9449
9540
|
patch(
|
|
9450
9541
|
activeBranch,
|
|
9451
9542
|
newFallback,
|
|
@@ -9652,7 +9743,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9652
9743
|
let hasUnresolvedAncestor = false;
|
|
9653
9744
|
while (parent) {
|
|
9654
9745
|
if (parent.pendingBranch) {
|
|
9655
|
-
|
|
9746
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9747
|
+
parent.effects.push(effects[i]);
|
|
9748
|
+
}
|
|
9656
9749
|
hasUnresolvedAncestor = true;
|
|
9657
9750
|
break;
|
|
9658
9751
|
}
|
|
@@ -9684,9 +9777,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9684
9777
|
if (!suspense.isInFallback) {
|
|
9685
9778
|
return;
|
|
9686
9779
|
}
|
|
9780
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
9687
9781
|
patch(
|
|
9688
9782
|
null,
|
|
9689
|
-
|
|
9783
|
+
latestFallback,
|
|
9690
9784
|
container2,
|
|
9691
9785
|
anchor2,
|
|
9692
9786
|
parentComponent2,
|
|
@@ -9696,7 +9790,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9696
9790
|
slotScopeIds,
|
|
9697
9791
|
optimized
|
|
9698
9792
|
);
|
|
9699
|
-
setActiveBranch(suspense,
|
|
9793
|
+
setActiveBranch(suspense, latestFallback);
|
|
9700
9794
|
};
|
|
9701
9795
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
9702
9796
|
if (delayEnter) {
|
|
@@ -10017,6 +10111,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10017
10111
|
if (vnode.key !== vnode.key) {
|
|
10018
10112
|
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
10019
10113
|
}
|
|
10114
|
+
if (props && vnode.shapeFlag & 1) {
|
|
10115
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
10116
|
+
if (overwritingProp && hasContentChildren(vnode.children)) {
|
|
10117
|
+
warn$1(
|
|
10118
|
+
`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`
|
|
10119
|
+
);
|
|
10120
|
+
}
|
|
10121
|
+
}
|
|
10020
10122
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
10021
10123
|
!isBlockNode && // has current parent block
|
|
10022
10124
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
@@ -10030,6 +10132,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10030
10132
|
}
|
|
10031
10133
|
return vnode;
|
|
10032
10134
|
}
|
|
10135
|
+
function hasContentChildren(children) {
|
|
10136
|
+
if (isString(children)) return children !== "";
|
|
10137
|
+
if (isArray(children)) return children.length > 0;
|
|
10138
|
+
return false;
|
|
10139
|
+
}
|
|
10033
10140
|
const createVNode = createVNodeWithArgsTransform ;
|
|
10034
10141
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
10035
10142
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -10466,7 +10573,12 @@ Component that was made reactive: `,
|
|
|
10466
10573
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10467
10574
|
if (isSSR) {
|
|
10468
10575
|
return setupResult.then((resolvedResult) => {
|
|
10469
|
-
|
|
10576
|
+
setInSSRSetupState(true);
|
|
10577
|
+
try {
|
|
10578
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
10579
|
+
} finally {
|
|
10580
|
+
setInSSRSetupState(false);
|
|
10581
|
+
}
|
|
10470
10582
|
}).catch((e) => {
|
|
10471
10583
|
handleError(e, instance, 0);
|
|
10472
10584
|
});
|
|
@@ -10930,7 +11042,7 @@ Component that was made reactive: `,
|
|
|
10930
11042
|
return true;
|
|
10931
11043
|
}
|
|
10932
11044
|
|
|
10933
|
-
const version = "3.5.
|
|
11045
|
+
const version = "3.5.42";
|
|
10934
11046
|
const warn = warn$1 ;
|
|
10935
11047
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10936
11048
|
const devtools = devtools$1 ;
|
|
@@ -11508,7 +11620,11 @@ Component that was made reactive: `,
|
|
|
11508
11620
|
}
|
|
11509
11621
|
}
|
|
11510
11622
|
if (name.startsWith("--")) {
|
|
11511
|
-
|
|
11623
|
+
if (importantRE.test(val)) {
|
|
11624
|
+
style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
11625
|
+
} else {
|
|
11626
|
+
style.setProperty(name, val);
|
|
11627
|
+
}
|
|
11512
11628
|
} else {
|
|
11513
11629
|
const prefixed = autoPrefix(style, name);
|
|
11514
11630
|
if (importantRE.test(val)) {
|
|
@@ -11881,7 +11997,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11881
11997
|
if (parent && parent._pendingResolve) {
|
|
11882
11998
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
11883
11999
|
this._pendingResolve = void 0;
|
|
11884
|
-
this.
|
|
12000
|
+
if (this.isConnected) {
|
|
12001
|
+
return this._resolveDef();
|
|
12002
|
+
}
|
|
11885
12003
|
});
|
|
11886
12004
|
} else {
|
|
11887
12005
|
this._resolveDef();
|
|
@@ -11931,7 +12049,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11931
12049
|
*/
|
|
11932
12050
|
_resolveDef() {
|
|
11933
12051
|
if (this._pendingResolve) {
|
|
11934
|
-
return;
|
|
12052
|
+
return this._pendingResolve;
|
|
11935
12053
|
}
|
|
11936
12054
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
11937
12055
|
this._setAttr(this.attributes[i].name);
|
|
@@ -11971,6 +12089,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11971
12089
|
def.configureApp = this._def.configureApp;
|
|
11972
12090
|
resolve(this._def = def, true);
|
|
11973
12091
|
});
|
|
12092
|
+
return this._pendingResolve;
|
|
11974
12093
|
} else {
|
|
11975
12094
|
resolve(this._def);
|
|
11976
12095
|
}
|
|
@@ -12008,6 +12127,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12008
12127
|
}
|
|
12009
12128
|
}
|
|
12010
12129
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
12130
|
+
if (key in Object.getPrototypeOf(this)) {
|
|
12131
|
+
warn(
|
|
12132
|
+
`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`
|
|
12133
|
+
);
|
|
12134
|
+
}
|
|
12011
12135
|
Object.defineProperty(this, key, {
|
|
12012
12136
|
get() {
|
|
12013
12137
|
return this._getProp(key);
|
|
@@ -12480,6 +12604,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12480
12604
|
}
|
|
12481
12605
|
}
|
|
12482
12606
|
const assignKey = /* @__PURE__ */ Symbol("_assign");
|
|
12607
|
+
const initialValueKey = /* @__PURE__ */ Symbol("_initialValue");
|
|
12483
12608
|
function castValue(value, trim, number) {
|
|
12484
12609
|
if (trim) value = value.trim();
|
|
12485
12610
|
if (number) value = looseToNumber(value);
|
|
@@ -12487,6 +12612,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12487
12612
|
}
|
|
12488
12613
|
const vModelText = {
|
|
12489
12614
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
12615
|
+
if (el.parentNode) {
|
|
12616
|
+
if (el.type === "text") {
|
|
12617
|
+
el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
12618
|
+
} else if (el.type === "textarea") {
|
|
12619
|
+
el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
12620
|
+
}
|
|
12621
|
+
}
|
|
12490
12622
|
el[assignKey] = getModelAssigner(vnode);
|
|
12491
12623
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
12492
12624
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
@@ -12505,8 +12637,15 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12505
12637
|
}
|
|
12506
12638
|
},
|
|
12507
12639
|
// set value on mounted so it's after min/max for type="range"
|
|
12508
|
-
mounted(el, { value }) {
|
|
12509
|
-
|
|
12640
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
12641
|
+
const newValue = value == null ? "" : value;
|
|
12642
|
+
const initialValue = el[initialValueKey];
|
|
12643
|
+
delete el[initialValueKey];
|
|
12644
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) {
|
|
12645
|
+
el[assignKey](castValue(el.value, trim, number));
|
|
12646
|
+
} else {
|
|
12647
|
+
el.value = newValue;
|
|
12648
|
+
}
|
|
12510
12649
|
},
|
|
12511
12650
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
12512
12651
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -12607,13 +12746,21 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12607
12746
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
12608
12747
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
12609
12748
|
);
|
|
12610
|
-
el
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12749
|
+
const multiple = el.multiple;
|
|
12750
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
12751
|
+
const pending = el._pendingValue = [
|
|
12752
|
+
multiple,
|
|
12753
|
+
multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue
|
|
12754
|
+
];
|
|
12755
|
+
try {
|
|
12756
|
+
el[assignKey](assignedValue);
|
|
12757
|
+
} finally {
|
|
12758
|
+
nextTick(() => {
|
|
12759
|
+
if (el._pendingValue === pending) {
|
|
12760
|
+
el._pendingValue = void 0;
|
|
12761
|
+
}
|
|
12762
|
+
});
|
|
12763
|
+
}
|
|
12617
12764
|
});
|
|
12618
12765
|
el[assignKey] = getModelAssigner(vnode);
|
|
12619
12766
|
},
|
|
@@ -12627,11 +12774,25 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12627
12774
|
el[assignKey] = getModelAssigner(vnode);
|
|
12628
12775
|
},
|
|
12629
12776
|
updated(el, { value }) {
|
|
12630
|
-
|
|
12777
|
+
const pending = el._pendingValue;
|
|
12778
|
+
el._pendingValue = void 0;
|
|
12779
|
+
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
12631
12780
|
setSelected(el, value);
|
|
12632
12781
|
}
|
|
12633
12782
|
}
|
|
12634
12783
|
};
|
|
12784
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
12785
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
12786
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
12787
|
+
if (isSet(value)) {
|
|
12788
|
+
if (value.size !== assignedValue.length) return false;
|
|
12789
|
+
for (const item of assignedValue) {
|
|
12790
|
+
if (!value.has(item)) return false;
|
|
12791
|
+
}
|
|
12792
|
+
return true;
|
|
12793
|
+
}
|
|
12794
|
+
return false;
|
|
12795
|
+
}
|
|
12635
12796
|
function setSelected(el, value) {
|
|
12636
12797
|
const isMultiple = el.multiple;
|
|
12637
12798
|
const isArrayValue = isArray(value);
|
|
@@ -16459,6 +16620,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16459
16620
|
node.loc
|
|
16460
16621
|
);
|
|
16461
16622
|
return () => {
|
|
16623
|
+
var _a;
|
|
16462
16624
|
let childBlock;
|
|
16463
16625
|
const { children } = forNode;
|
|
16464
16626
|
if (isTemplate) {
|
|
@@ -16502,7 +16664,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16502
16664
|
if (isTemplate && keyProperty) {
|
|
16503
16665
|
injectProp(childBlock, keyProperty, context);
|
|
16504
16666
|
}
|
|
16505
|
-
|
|
16667
|
+
const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
|
|
16668
|
+
if (childBlock.isBlock !== shouldUseBlock) {
|
|
16506
16669
|
if (childBlock.isBlock) {
|
|
16507
16670
|
removeHelper(OPEN_BLOCK);
|
|
16508
16671
|
removeHelper(
|
|
@@ -16514,12 +16677,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16514
16677
|
);
|
|
16515
16678
|
}
|
|
16516
16679
|
}
|
|
16517
|
-
childBlock.isBlock =
|
|
16680
|
+
childBlock.isBlock = shouldUseBlock;
|
|
16518
16681
|
if (childBlock.isBlock) {
|
|
16519
16682
|
helper(OPEN_BLOCK);
|
|
16520
16683
|
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
16521
16684
|
} else {
|
|
16522
16685
|
helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
16686
|
+
if (childBlock.needsPatch) {
|
|
16687
|
+
childBlock.patchFlag = ((_a = childBlock.patchFlag) != null ? _a : 0) | 512;
|
|
16688
|
+
}
|
|
16523
16689
|
}
|
|
16524
16690
|
}
|
|
16525
16691
|
if (memo) {
|
|
@@ -16895,6 +17061,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16895
17061
|
let vnodeDynamicProps;
|
|
16896
17062
|
let dynamicPropNames;
|
|
16897
17063
|
let vnodeDirectives;
|
|
17064
|
+
let needsPatch = false;
|
|
17065
|
+
let isBlockRequired = false;
|
|
16898
17066
|
let shouldUseBlock = (
|
|
16899
17067
|
// dynamic component may resolve to plain elements
|
|
16900
17068
|
isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
|
|
@@ -16914,6 +17082,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16914
17082
|
vnodeProps = propsBuildResult.props;
|
|
16915
17083
|
patchFlag = propsBuildResult.patchFlag;
|
|
16916
17084
|
dynamicPropNames = propsBuildResult.dynamicPropNames;
|
|
17085
|
+
needsPatch = propsBuildResult.needsPatch;
|
|
17086
|
+
isBlockRequired = propsBuildResult.isBlockRequired;
|
|
16917
17087
|
const directives = propsBuildResult.directives;
|
|
16918
17088
|
vnodeDirectives = directives && directives.length ? createArrayExpression(
|
|
16919
17089
|
directives.map((dir) => buildDirectiveArgs(dir, context))
|
|
@@ -16964,7 +17134,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16964
17134
|
if (dynamicPropNames && dynamicPropNames.length) {
|
|
16965
17135
|
vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
|
|
16966
17136
|
}
|
|
16967
|
-
node.codegenNode = createVNodeCall(
|
|
17137
|
+
const vnodeCall = node.codegenNode = createVNodeCall(
|
|
16968
17138
|
context,
|
|
16969
17139
|
vnodeTag,
|
|
16970
17140
|
vnodeProps,
|
|
@@ -16977,6 +17147,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16977
17147
|
isComponent,
|
|
16978
17148
|
node.loc
|
|
16979
17149
|
);
|
|
17150
|
+
needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
|
|
17151
|
+
if (needsPatch) {
|
|
17152
|
+
vnodeCall.needsPatch = true;
|
|
17153
|
+
}
|
|
17154
|
+
if (isBlockRequired) {
|
|
17155
|
+
vnodeCall.isBlockRequired = true;
|
|
17156
|
+
}
|
|
16980
17157
|
};
|
|
16981
17158
|
};
|
|
16982
17159
|
function resolveComponentType(node, context, ssr = false) {
|
|
@@ -17025,6 +17202,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17025
17202
|
const runtimeDirectives = [];
|
|
17026
17203
|
const hasChildren = children.length > 0;
|
|
17027
17204
|
let shouldUseBlock = false;
|
|
17205
|
+
let isBlockRequired = false;
|
|
17028
17206
|
let patchFlag = 0;
|
|
17029
17207
|
let hasRef = false;
|
|
17030
17208
|
let hasClassBinding = false;
|
|
@@ -17066,19 +17244,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17066
17244
|
if (isEventHandler && isReservedProp(name)) {
|
|
17067
17245
|
hasVnodeHook = true;
|
|
17068
17246
|
}
|
|
17247
|
+
if (name === "ref") {
|
|
17248
|
+
hasRef = true;
|
|
17249
|
+
}
|
|
17069
17250
|
if (isEventHandler && value.type === 14) {
|
|
17070
17251
|
value = value.arguments[0];
|
|
17071
17252
|
}
|
|
17072
17253
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
17073
17254
|
return;
|
|
17074
17255
|
}
|
|
17075
|
-
if (name === "
|
|
17076
|
-
hasRef = true;
|
|
17077
|
-
} else if (name === "class") {
|
|
17256
|
+
if (name === "class") {
|
|
17078
17257
|
hasClassBinding = true;
|
|
17079
17258
|
} else if (name === "style") {
|
|
17080
17259
|
hasStyleBinding = true;
|
|
17081
|
-
} else if (name !== "key" && !dynamicPropNames.includes(name)) {
|
|
17260
|
+
} else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) {
|
|
17082
17261
|
dynamicPropNames.push(name);
|
|
17083
17262
|
}
|
|
17084
17263
|
if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
|
|
@@ -17131,13 +17310,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17131
17310
|
if (isVOn && ssr) {
|
|
17132
17311
|
continue;
|
|
17133
17312
|
}
|
|
17134
|
-
if (
|
|
17135
|
-
|
|
17136
|
-
|
|
17137
|
-
|
|
17138
|
-
isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
|
|
17139
|
-
) {
|
|
17313
|
+
if (isVBind && isStaticArgOf(arg, "key")) {
|
|
17314
|
+
shouldUseBlock = true;
|
|
17315
|
+
}
|
|
17316
|
+
if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
|
|
17140
17317
|
shouldUseBlock = true;
|
|
17318
|
+
isBlockRequired = true;
|
|
17141
17319
|
}
|
|
17142
17320
|
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
17143
17321
|
pushRefVForMarker();
|
|
@@ -17189,6 +17367,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17189
17367
|
runtimeDirectives.push(prop);
|
|
17190
17368
|
if (hasChildren) {
|
|
17191
17369
|
shouldUseBlock = true;
|
|
17370
|
+
isBlockRequired = true;
|
|
17192
17371
|
}
|
|
17193
17372
|
}
|
|
17194
17373
|
}
|
|
@@ -17227,7 +17406,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17227
17406
|
patchFlag |= 32;
|
|
17228
17407
|
}
|
|
17229
17408
|
}
|
|
17230
|
-
|
|
17409
|
+
const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
|
|
17410
|
+
if (!shouldUseBlock && needsPatch) {
|
|
17231
17411
|
patchFlag |= 512;
|
|
17232
17412
|
}
|
|
17233
17413
|
if (!context.inSSR && propsExpression) {
|
|
@@ -17293,7 +17473,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17293
17473
|
directives: runtimeDirectives,
|
|
17294
17474
|
patchFlag,
|
|
17295
17475
|
dynamicPropNames,
|
|
17296
|
-
shouldUseBlock
|
|
17476
|
+
shouldUseBlock,
|
|
17477
|
+
needsPatch,
|
|
17478
|
+
isBlockRequired
|
|
17297
17479
|
};
|
|
17298
17480
|
}
|
|
17299
17481
|
function dedupeProperties(properties) {
|