@vue/compat 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 +236 -51
- package/dist/vue.cjs.prod.js +174 -48
- package/dist/vue.esm-browser.js +232 -50
- package/dist/vue.esm-browser.prod.js +9 -8
- package/dist/vue.esm-bundler.js +232 -50
- package/dist/vue.global.js +232 -50
- package/dist/vue.global.prod.js +9 -8
- package/dist/vue.runtime.esm-browser.js +196 -35
- package/dist/vue.runtime.esm-browser.prod.js +4 -3
- package/dist/vue.runtime.esm-bundler.js +196 -35
- package/dist/vue.runtime.global.js +196 -35
- package/dist/vue.runtime.global.prod.js +4 -3
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.42
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -197,7 +197,7 @@ var Vue = (function () {
|
|
|
197
197
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
198
198
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
199
199
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
200
|
-
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,
|
|
200
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
201
201
|
);
|
|
202
202
|
function includeBooleanAttr(value) {
|
|
203
203
|
return !!value || value === "";
|
|
@@ -232,6 +232,23 @@ var Vue = (function () {
|
|
|
232
232
|
}
|
|
233
233
|
return equal;
|
|
234
234
|
}
|
|
235
|
+
function looseCompareCollections(a, b) {
|
|
236
|
+
if (a.size !== b.size) return false;
|
|
237
|
+
const candidates = Array.from(b);
|
|
238
|
+
const matched = new Uint8Array(candidates.length);
|
|
239
|
+
for (const item of a) {
|
|
240
|
+
let index = -1;
|
|
241
|
+
for (let i = 0; i < candidates.length; i++) {
|
|
242
|
+
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
243
|
+
index = i;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (index < 0) return false;
|
|
248
|
+
matched[index] = 1;
|
|
249
|
+
}
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
235
252
|
function looseEqual(a, b) {
|
|
236
253
|
if (a === b) return true;
|
|
237
254
|
let aValidType = isDate(a);
|
|
@@ -255,6 +272,16 @@ var Vue = (function () {
|
|
|
255
272
|
if (!aValidType || !bValidType) {
|
|
256
273
|
return false;
|
|
257
274
|
}
|
|
275
|
+
aValidType = isMap(a);
|
|
276
|
+
bValidType = isMap(b);
|
|
277
|
+
if (aValidType || bValidType) {
|
|
278
|
+
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
279
|
+
}
|
|
280
|
+
aValidType = isSet(a);
|
|
281
|
+
bValidType = isSet(b);
|
|
282
|
+
if (aValidType || bValidType) {
|
|
283
|
+
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
284
|
+
}
|
|
258
285
|
const aKeysCount = Object.keys(a).length;
|
|
259
286
|
const bKeysCount = Object.keys(b).length;
|
|
260
287
|
if (aKeysCount !== bKeysCount) {
|
|
@@ -2600,7 +2627,9 @@ var Vue = (function () {
|
|
|
2600
2627
|
cb.flags |= 1;
|
|
2601
2628
|
}
|
|
2602
2629
|
} else {
|
|
2603
|
-
|
|
2630
|
+
for (let i = 0; i < cb.length; i++) {
|
|
2631
|
+
pendingPostFlushCbs.push(cb[i]);
|
|
2632
|
+
}
|
|
2604
2633
|
}
|
|
2605
2634
|
queueFlush();
|
|
2606
2635
|
}
|
|
@@ -2636,7 +2665,9 @@ var Vue = (function () {
|
|
|
2636
2665
|
);
|
|
2637
2666
|
pendingPostFlushCbs.length = 0;
|
|
2638
2667
|
if (activePostFlushCbs) {
|
|
2639
|
-
|
|
2668
|
+
for (let i = 0; i < deduped.length; i++) {
|
|
2669
|
+
activePostFlushCbs.push(deduped[i]);
|
|
2670
|
+
}
|
|
2640
2671
|
return;
|
|
2641
2672
|
}
|
|
2642
2673
|
activePostFlushCbs = deduped;
|
|
@@ -4369,7 +4400,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4369
4400
|
function setTransitionHooks(vnode, hooks) {
|
|
4370
4401
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4371
4402
|
vnode.transition = hooks;
|
|
4372
|
-
|
|
4403
|
+
const subTree = vnode.component.subTree;
|
|
4404
|
+
setTransitionHooks(
|
|
4405
|
+
isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree,
|
|
4406
|
+
hooks
|
|
4407
|
+
);
|
|
4373
4408
|
} else if (vnode.shapeFlag & 128) {
|
|
4374
4409
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4375
4410
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4772,10 +4807,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4772
4807
|
getContainerType(container),
|
|
4773
4808
|
optimized
|
|
4774
4809
|
);
|
|
4775
|
-
if (isAsyncWrapper(vnode) && !vnode.
|
|
4810
|
+
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
4776
4811
|
let subTree;
|
|
4777
4812
|
if (isFragmentStart) {
|
|
4778
|
-
subTree = createVNode(
|
|
4813
|
+
subTree = createVNode(Static);
|
|
4779
4814
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4780
4815
|
} else {
|
|
4781
4816
|
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
@@ -4909,6 +4944,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4909
4944
|
}
|
|
4910
4945
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4911
4946
|
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4947
|
+
if (isUnchangedResourceProp(el, key, props[key])) {
|
|
4948
|
+
continue;
|
|
4949
|
+
}
|
|
4912
4950
|
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4913
4951
|
}
|
|
4914
4952
|
}
|
|
@@ -5091,6 +5129,13 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5091
5129
|
};
|
|
5092
5130
|
return [hydrate, hydrateNode];
|
|
5093
5131
|
}
|
|
5132
|
+
const resourceProps = /* @__PURE__ */ new Set(["src", "srcset", "href", "poster"]);
|
|
5133
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
5134
|
+
if (!resourceProps.has(key)) {
|
|
5135
|
+
return false;
|
|
5136
|
+
}
|
|
5137
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
5138
|
+
}
|
|
5094
5139
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5095
5140
|
let mismatchType;
|
|
5096
5141
|
let mismatchKey;
|
|
@@ -5128,7 +5173,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5128
5173
|
mismatchKey = "style";
|
|
5129
5174
|
}
|
|
5130
5175
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
5131
|
-
if (
|
|
5176
|
+
if (key === "hidden") {
|
|
5177
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
5178
|
+
expected = normalizeHiddenValue(clientValue);
|
|
5179
|
+
} else if (isBooleanAttr(key)) {
|
|
5132
5180
|
actual = el.hasAttribute(key);
|
|
5133
5181
|
expected = includeBooleanAttr(clientValue);
|
|
5134
5182
|
} else if (clientValue == null) {
|
|
@@ -5164,6 +5212,15 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5164
5212
|
}
|
|
5165
5213
|
return false;
|
|
5166
5214
|
}
|
|
5215
|
+
function normalizeHiddenValue(value) {
|
|
5216
|
+
if (!isRenderableAttrValue(value)) {
|
|
5217
|
+
return false;
|
|
5218
|
+
}
|
|
5219
|
+
if (isString(value)) {
|
|
5220
|
+
return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
5221
|
+
}
|
|
5222
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
5223
|
+
}
|
|
5167
5224
|
function toClassSet(str) {
|
|
5168
5225
|
return new Set(str.trim().split(/\s+/));
|
|
5169
5226
|
}
|
|
@@ -5656,7 +5713,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5656
5713
|
if (pendingCacheKey != null) {
|
|
5657
5714
|
if (isSuspense(instance.subTree.type)) {
|
|
5658
5715
|
queuePostRenderEffect(() => {
|
|
5659
|
-
|
|
5716
|
+
const vnode = getInnerChild(instance.subTree);
|
|
5717
|
+
if (vnode.component) {
|
|
5718
|
+
cache.set(pendingCacheKey, vnode);
|
|
5719
|
+
}
|
|
5660
5720
|
}, instance.subTree.suspense);
|
|
5661
5721
|
} else {
|
|
5662
5722
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
@@ -6268,7 +6328,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6268
6328
|
return slots;
|
|
6269
6329
|
}
|
|
6270
6330
|
|
|
6271
|
-
function renderSlot(slots, name, props
|
|
6331
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
6332
|
+
if (props == null) props = {};
|
|
6272
6333
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
6273
6334
|
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
6274
6335
|
const hasProps = Object.keys(slotProps).length > 0;
|
|
@@ -6576,12 +6637,41 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6576
6637
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
6577
6638
|
return getPublicInstance(i.parent);
|
|
6578
6639
|
};
|
|
6640
|
+
const resolveDevRootEl = (vnode) => {
|
|
6641
|
+
let found = false;
|
|
6642
|
+
while (true) {
|
|
6643
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
6644
|
+
const root = filterSingleRoot(vnode.children);
|
|
6645
|
+
if (!root) {
|
|
6646
|
+
return;
|
|
6647
|
+
}
|
|
6648
|
+
vnode = root;
|
|
6649
|
+
found = true;
|
|
6650
|
+
continue;
|
|
6651
|
+
}
|
|
6652
|
+
const component = vnode.component;
|
|
6653
|
+
if (component && component.subTree) {
|
|
6654
|
+
vnode = component.subTree;
|
|
6655
|
+
continue;
|
|
6656
|
+
}
|
|
6657
|
+
const suspense = vnode.suspense;
|
|
6658
|
+
if (suspense && suspense.activeBranch) {
|
|
6659
|
+
vnode = suspense.activeBranch;
|
|
6660
|
+
continue;
|
|
6661
|
+
}
|
|
6662
|
+
return found ? vnode.el : void 0;
|
|
6663
|
+
}
|
|
6664
|
+
};
|
|
6665
|
+
const getDevRootFragmentEl = (i) => {
|
|
6666
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
6667
|
+
return el === void 0 ? i.vnode.el : el;
|
|
6668
|
+
};
|
|
6579
6669
|
const publicPropertiesMap = (
|
|
6580
6670
|
// Move PURE marker to new line to workaround compiler discarding it
|
|
6581
6671
|
// due to type annotation
|
|
6582
6672
|
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
6583
6673
|
$: (i) => i,
|
|
6584
|
-
$el: (i) => i
|
|
6674
|
+
$el: (i) => getDevRootFragmentEl(i) ,
|
|
6585
6675
|
$data: (i) => i.data,
|
|
6586
6676
|
$props: (i) => shallowReadonly(i.props) ,
|
|
6587
6677
|
$attrs: (i) => shallowReadonly(i.attrs) ,
|
|
@@ -7492,7 +7582,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7492
7582
|
return vm;
|
|
7493
7583
|
}
|
|
7494
7584
|
}
|
|
7495
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7585
|
+
Vue.version = `2.6.14-compat:${"3.5.42"}`;
|
|
7496
7586
|
Vue.config = singletonApp.config;
|
|
7497
7587
|
Vue.use = (plugin, ...options) => {
|
|
7498
7588
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8249,7 +8339,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8249
8339
|
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
8250
8340
|
}
|
|
8251
8341
|
if (modifiers.number) {
|
|
8252
|
-
args =
|
|
8342
|
+
args = args.map(looseToNumber);
|
|
8253
8343
|
}
|
|
8254
8344
|
}
|
|
8255
8345
|
{
|
|
@@ -8514,12 +8604,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8514
8604
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
8515
8605
|
}
|
|
8516
8606
|
if (vnode.transition) {
|
|
8517
|
-
|
|
8607
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
8608
|
+
if (!isElementRoot(child)) {
|
|
8518
8609
|
warn$1(
|
|
8519
8610
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8520
8611
|
);
|
|
8521
8612
|
}
|
|
8522
|
-
setTransitionHooks(
|
|
8613
|
+
setTransitionHooks(child, vnode.transition);
|
|
8523
8614
|
}
|
|
8524
8615
|
if (setRoot) {
|
|
8525
8616
|
setRoot(root);
|
|
@@ -11025,7 +11116,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11025
11116
|
if (suspense.deps <= 0) {
|
|
11026
11117
|
suspense.resolve();
|
|
11027
11118
|
} else if (isInFallback) {
|
|
11028
|
-
if (!isHydrating) {
|
|
11119
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
11029
11120
|
patch(
|
|
11030
11121
|
activeBranch,
|
|
11031
11122
|
newFallback,
|
|
@@ -11066,7 +11157,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11066
11157
|
);
|
|
11067
11158
|
if (suspense.deps <= 0) {
|
|
11068
11159
|
suspense.resolve();
|
|
11069
|
-
} else {
|
|
11160
|
+
} else if (!suspense.isFallbackMountPending) {
|
|
11070
11161
|
patch(
|
|
11071
11162
|
activeBranch,
|
|
11072
11163
|
newFallback,
|
|
@@ -11273,7 +11364,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11273
11364
|
let hasUnresolvedAncestor = false;
|
|
11274
11365
|
while (parent) {
|
|
11275
11366
|
if (parent.pendingBranch) {
|
|
11276
|
-
|
|
11367
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11368
|
+
parent.effects.push(effects[i]);
|
|
11369
|
+
}
|
|
11277
11370
|
hasUnresolvedAncestor = true;
|
|
11278
11371
|
break;
|
|
11279
11372
|
}
|
|
@@ -11305,9 +11398,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11305
11398
|
if (!suspense.isInFallback) {
|
|
11306
11399
|
return;
|
|
11307
11400
|
}
|
|
11401
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
11308
11402
|
patch(
|
|
11309
11403
|
null,
|
|
11310
|
-
|
|
11404
|
+
latestFallback,
|
|
11311
11405
|
container2,
|
|
11312
11406
|
anchor2,
|
|
11313
11407
|
parentComponent2,
|
|
@@ -11317,7 +11411,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11317
11411
|
slotScopeIds,
|
|
11318
11412
|
optimized
|
|
11319
11413
|
);
|
|
11320
|
-
setActiveBranch(suspense,
|
|
11414
|
+
setActiveBranch(suspense, latestFallback);
|
|
11321
11415
|
};
|
|
11322
11416
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
11323
11417
|
if (delayEnter) {
|
|
@@ -11695,6 +11789,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11695
11789
|
if (vnode.key !== vnode.key) {
|
|
11696
11790
|
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
11697
11791
|
}
|
|
11792
|
+
if (props && vnode.shapeFlag & 1) {
|
|
11793
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
11794
|
+
if (overwritingProp && hasContentChildren(vnode.children)) {
|
|
11795
|
+
warn$1(
|
|
11796
|
+
`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`
|
|
11797
|
+
);
|
|
11798
|
+
}
|
|
11799
|
+
}
|
|
11698
11800
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
11699
11801
|
!isBlockNode && // has current parent block
|
|
11700
11802
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
@@ -11712,6 +11814,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11712
11814
|
}
|
|
11713
11815
|
return vnode;
|
|
11714
11816
|
}
|
|
11817
|
+
function hasContentChildren(children) {
|
|
11818
|
+
if (isString(children)) return children !== "";
|
|
11819
|
+
if (isArray(children)) return children.length > 0;
|
|
11820
|
+
return false;
|
|
11821
|
+
}
|
|
11715
11822
|
const createVNode = createVNodeWithArgsTransform ;
|
|
11716
11823
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
11717
11824
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -12154,7 +12261,12 @@ Component that was made reactive: `,
|
|
|
12154
12261
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
12155
12262
|
if (isSSR) {
|
|
12156
12263
|
return setupResult.then((resolvedResult) => {
|
|
12157
|
-
|
|
12264
|
+
setInSSRSetupState(true);
|
|
12265
|
+
try {
|
|
12266
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
12267
|
+
} finally {
|
|
12268
|
+
setInSSRSetupState(false);
|
|
12269
|
+
}
|
|
12158
12270
|
}).catch((e) => {
|
|
12159
12271
|
handleError(e, instance, 0);
|
|
12160
12272
|
});
|
|
@@ -12630,7 +12742,7 @@ Component that was made reactive: `,
|
|
|
12630
12742
|
return true;
|
|
12631
12743
|
}
|
|
12632
12744
|
|
|
12633
|
-
const version = "3.5.
|
|
12745
|
+
const version = "3.5.42";
|
|
12634
12746
|
const warn = warn$1 ;
|
|
12635
12747
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12636
12748
|
const devtools = devtools$1 ;
|
|
@@ -13252,7 +13364,11 @@ Component that was made reactive: `,
|
|
|
13252
13364
|
}
|
|
13253
13365
|
}
|
|
13254
13366
|
if (name.startsWith("--")) {
|
|
13255
|
-
|
|
13367
|
+
if (importantRE.test(val)) {
|
|
13368
|
+
style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
13369
|
+
} else {
|
|
13370
|
+
style.setProperty(name, val);
|
|
13371
|
+
}
|
|
13256
13372
|
} else {
|
|
13257
13373
|
const prefixed = autoPrefix(style, name);
|
|
13258
13374
|
if (importantRE.test(val)) {
|
|
@@ -13669,7 +13785,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13669
13785
|
if (parent && parent._pendingResolve) {
|
|
13670
13786
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
13671
13787
|
this._pendingResolve = void 0;
|
|
13672
|
-
this.
|
|
13788
|
+
if (this.isConnected) {
|
|
13789
|
+
return this._resolveDef();
|
|
13790
|
+
}
|
|
13673
13791
|
});
|
|
13674
13792
|
} else {
|
|
13675
13793
|
this._resolveDef();
|
|
@@ -13719,7 +13837,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13719
13837
|
*/
|
|
13720
13838
|
_resolveDef() {
|
|
13721
13839
|
if (this._pendingResolve) {
|
|
13722
|
-
return;
|
|
13840
|
+
return this._pendingResolve;
|
|
13723
13841
|
}
|
|
13724
13842
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13725
13843
|
this._setAttr(this.attributes[i].name);
|
|
@@ -13759,6 +13877,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13759
13877
|
def.configureApp = this._def.configureApp;
|
|
13760
13878
|
resolve(this._def = def, true);
|
|
13761
13879
|
});
|
|
13880
|
+
return this._pendingResolve;
|
|
13762
13881
|
} else {
|
|
13763
13882
|
resolve(this._def);
|
|
13764
13883
|
}
|
|
@@ -13796,6 +13915,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13796
13915
|
}
|
|
13797
13916
|
}
|
|
13798
13917
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
13918
|
+
if (key in Object.getPrototypeOf(this)) {
|
|
13919
|
+
warn(
|
|
13920
|
+
`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`
|
|
13921
|
+
);
|
|
13922
|
+
}
|
|
13799
13923
|
Object.defineProperty(this, key, {
|
|
13800
13924
|
get() {
|
|
13801
13925
|
return this._getProp(key);
|
|
@@ -14277,6 +14401,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14277
14401
|
}
|
|
14278
14402
|
}
|
|
14279
14403
|
const assignKey = /* @__PURE__ */ Symbol("_assign");
|
|
14404
|
+
const initialValueKey = /* @__PURE__ */ Symbol("_initialValue");
|
|
14280
14405
|
function castValue(value, trim, number) {
|
|
14281
14406
|
if (trim) value = value.trim();
|
|
14282
14407
|
if (number) value = looseToNumber(value);
|
|
@@ -14284,6 +14409,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14284
14409
|
}
|
|
14285
14410
|
const vModelText = {
|
|
14286
14411
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
14412
|
+
if (el.parentNode) {
|
|
14413
|
+
if (el.type === "text") {
|
|
14414
|
+
el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
14415
|
+
} else if (el.type === "textarea") {
|
|
14416
|
+
el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
14417
|
+
}
|
|
14418
|
+
}
|
|
14287
14419
|
el[assignKey] = getModelAssigner(vnode);
|
|
14288
14420
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
14289
14421
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
@@ -14302,8 +14434,15 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14302
14434
|
}
|
|
14303
14435
|
},
|
|
14304
14436
|
// set value on mounted so it's after min/max for type="range"
|
|
14305
|
-
mounted(el, { value }) {
|
|
14306
|
-
|
|
14437
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
14438
|
+
const newValue = value == null ? "" : value;
|
|
14439
|
+
const initialValue = el[initialValueKey];
|
|
14440
|
+
delete el[initialValueKey];
|
|
14441
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) {
|
|
14442
|
+
el[assignKey](castValue(el.value, trim, number));
|
|
14443
|
+
} else {
|
|
14444
|
+
el.value = newValue;
|
|
14445
|
+
}
|
|
14307
14446
|
},
|
|
14308
14447
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
14309
14448
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -14404,13 +14543,21 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14404
14543
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
14405
14544
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
14406
14545
|
);
|
|
14407
|
-
el
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14546
|
+
const multiple = el.multiple;
|
|
14547
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
14548
|
+
const pending = el._pendingValue = [
|
|
14549
|
+
multiple,
|
|
14550
|
+
multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue
|
|
14551
|
+
];
|
|
14552
|
+
try {
|
|
14553
|
+
el[assignKey](assignedValue);
|
|
14554
|
+
} finally {
|
|
14555
|
+
nextTick(() => {
|
|
14556
|
+
if (el._pendingValue === pending) {
|
|
14557
|
+
el._pendingValue = void 0;
|
|
14558
|
+
}
|
|
14559
|
+
});
|
|
14560
|
+
}
|
|
14414
14561
|
});
|
|
14415
14562
|
el[assignKey] = getModelAssigner(vnode);
|
|
14416
14563
|
},
|
|
@@ -14424,11 +14571,25 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14424
14571
|
el[assignKey] = getModelAssigner(vnode);
|
|
14425
14572
|
},
|
|
14426
14573
|
updated(el, { value }) {
|
|
14427
|
-
|
|
14574
|
+
const pending = el._pendingValue;
|
|
14575
|
+
el._pendingValue = void 0;
|
|
14576
|
+
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
14428
14577
|
setSelected(el, value);
|
|
14429
14578
|
}
|
|
14430
14579
|
}
|
|
14431
14580
|
};
|
|
14581
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
14582
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
14583
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
14584
|
+
if (isSet(value)) {
|
|
14585
|
+
if (value.size !== assignedValue.length) return false;
|
|
14586
|
+
for (const item of assignedValue) {
|
|
14587
|
+
if (!value.has(item)) return false;
|
|
14588
|
+
}
|
|
14589
|
+
return true;
|
|
14590
|
+
}
|
|
14591
|
+
return false;
|
|
14592
|
+
}
|
|
14432
14593
|
function setSelected(el, value) {
|
|
14433
14594
|
const isMultiple = el.multiple;
|
|
14434
14595
|
const isArrayValue = isArray(value);
|